fix(relay): suffix production Axiom resource names

Co-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marmingeandcodex committed 2026-06-04 14:03:00 -07:00
1 parent fe2e557cc8
commit 56009d5a5b
3 files changed
+11 -9

No files matched your search

+6 -6
View File
@@ -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'],
+4 -2
View File
@@ -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",
);
+1 -1
View File
@@ -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 {