Skip to content

Commit c0d83d9

Browse files
fix(observability): dev:built web bundles report the dev channel
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a289d01 commit c0d83d9

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎apps/web/src/observability/clientTracing.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ import { APP_VERSION } from "~/branding";
1616

1717
const DEFAULT_EXPORT_INTERVAL_MS = 1_000;
1818
// PR previews can't mark themselves in APP_VERSION without breaking the version-skew check against the server.
19-
const RELEASE_CHANNEL = import.meta.env.DEV
20-
? "dev"
21-
: import.meta.env.VITE_RELEASE_CHANNEL === "preview"
22-
? "preview"
23-
: releaseChannelOf(APP_VERSION);
19+
const RELEASE_CHANNEL =
20+
import.meta.env.DEV || import.meta.env.VITE_RELEASE_CHANNEL === "dev"
21+
? "dev"
22+
: import.meta.env.VITE_RELEASE_CHANNEL === "preview"
23+
? "preview"
24+
: releaseChannelOf(APP_VERSION);
2425
const CLIENT_TRACING_RESOURCE = {
2526
serviceName: "t3code-web",
2627
attributes: {

‎apps/web/vite.config.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const configuredRelayTracingUrl = repoEnv.VITE_RELAY_OTLP_TRACES_URL?.trim() ||
3939
const configuredRelayTracingDataset = repoEnv.VITE_RELAY_OTLP_TRACES_DATASET?.trim() || "";
4040
const configuredRelayTracingToken = repoEnv.VITE_RELAY_OTLP_TRACES_TOKEN?.trim() || "";
4141
const configuredHostedAppChannel = process.env.VITE_HOSTED_APP_CHANNEL?.trim() || "";
42-
const configuredReleaseChannel = process.env.VITE_RELEASE_CHANNEL?.trim() || "";
42+
const configuredReleaseChannel =
43+
process.env.T3CODE_BUILT_DEV === "1" ? "dev" : process.env.VITE_RELEASE_CHANNEL?.trim() || "";
4344
const configuredAppVersion = process.env.APP_VERSION?.trim() || pkg.version;
4445
const configuredDesktopUpdateRepository =
4546
process.env.T3CODE_DESKTOP_UPDATE_REPOSITORY?.trim() ||

0 commit comments

Comments
 (0)