diff --git a/docs/relay-observability.md b/docs/relay-observability.md index 2b17fa2977..9a096853ad 100644 --- a/docs/relay-observability.md +++ b/docs/relay-observability.md @@ -2,12 +2,12 @@ The relay Alchemy stack owns a focused Axiom trace setup: -- `t3-code-relay-traces`, an OpenTelemetry trace dataset for Worker requests -- `t3-code-relay-otel-ingest`, a dataset-scoped ingest token bound to the Worker -- `t3-code-relay-recent-spans`, a view of recent request and endpoint spans +- `t3-code-relay-traces-prod`, an OpenTelemetry trace dataset for Worker requests +- `t3-code-relay-otel-ingest-prod`, a dataset-scoped ingest token bound to the Worker +- `t3-code-relay-recent-spans-prod`, a view of recent request and endpoint spans -These are the production names. Non-production Alchemy stages append their sanitized stage name, -for example `t3-code-relay-traces-dev-julius`. +Alchemy stages append their sanitized stage name to isolate resources, for example +`t3-code-relay-traces-dev-julius` for a personal stage. Deploy from `infra/relay` with the normal Alchemy workflow: @@ -23,7 +23,7 @@ Effect's OpenTelemetry exporter stores semantic HTTP attributes below the `attri For example: ```apl -['t3-code-relay-traces'] +['t3-code-relay-traces-prod'] | where name startswith 'http.server' | project _time, name, trace_id, duration, ['attributes.http.request.method'], diff --git a/infra/relay/src/deploymentConfig.test.ts b/infra/relay/src/deploymentConfig.test.ts index 05704454be..5aadb277c8 100644 --- a/infra/relay/src/deploymentConfig.test.ts +++ b/infra/relay/src/deploymentConfig.test.ts @@ -28,8 +28,10 @@ describe("relayPublicDomainForStage", () => { }); describe("relayResourceNameForStage", () => { - it("preserves production names and isolates personal stages", () => { - expect(relayResourceNameForStage("t3-code-relay-traces", "prod")).toBe("t3-code-relay-traces"); + it("isolates production and personal stages", () => { + expect(relayResourceNameForStage("t3-code-relay-traces", "prod")).toBe( + "t3-code-relay-traces-prod", + ); expect(relayResourceNameForStage("t3-code-relay-traces", "dev_julius")).toBe( "t3-code-relay-traces-dev-julius", ); diff --git a/infra/relay/src/deploymentConfig.ts b/infra/relay/src/deploymentConfig.ts index 95c9705bee..e8498214b0 100644 --- a/infra/relay/src/deploymentConfig.ts +++ b/infra/relay/src/deploymentConfig.ts @@ -34,7 +34,7 @@ export function relayStageSlug(stage: string): string { } export function relayResourceNameForStage(name: string, stage: string): string { - return stage === "prod" ? name : `${name}-${relayStageSlug(stage)}`; + return `${name}-${relayStageSlug(stage)}`; } export function relayPublicDomainForStage(stage: string, zoneName: string): string {