Skip to content

Commit 538a766

Browse files
committed
Expose OTLP headers to child task processes
1 parent 3f4ac50 commit 538a766

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • packages/cli-v3/src/entryPoints/managed

‎packages/cli-v3/src/entryPoints/managed/env.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const Env = z.object({
3535
TRIGGER_WORKLOAD_CONTROLLER_ID: z.string().default(`controller_${randomUUID()}`),
3636
TRIGGER_ENV_ID: z.string(),
3737
OTEL_EXPORTER_OTLP_ENDPOINT: z.string().url(),
38+
// Forward the run-scoped exporter credentials so child processes can export spans to the run.
39+
OTEL_EXPORTER_OTLP_HEADERS: z.string().optional(),
3840
TRIGGER_WARM_START_URL: z.string().optional(),
3941
TRIGGER_WARM_START_CONNECTION_TIMEOUT_MS: z.coerce.number().default(30_000),
4042
TRIGGER_WARM_START_KEEPALIVE_MS: z.coerce.number().default(300_000),
@@ -99,6 +101,9 @@ export class RunnerEnv {
99101
get OTEL_EXPORTER_OTLP_ENDPOINT() {
100102
return this.env.OTEL_EXPORTER_OTLP_ENDPOINT;
101103
}
104+
get OTEL_EXPORTER_OTLP_HEADERS() {
105+
return this.env.OTEL_EXPORTER_OTLP_HEADERS;
106+
}
102107
get TRIGGER_CONTENT_HASH() {
103108
return this.env.TRIGGER_CONTENT_HASH;
104109
}
@@ -261,6 +266,7 @@ export class RunnerEnv {
261266
NODE_ENV: this.NODE_ENV,
262267
NODE_EXTRA_CA_CERTS: this.NODE_EXTRA_CA_CERTS,
263268
OTEL_EXPORTER_OTLP_ENDPOINT: this.OTEL_EXPORTER_OTLP_ENDPOINT,
269+
OTEL_EXPORTER_OTLP_HEADERS: this.OTEL_EXPORTER_OTLP_HEADERS,
264270
TRIGGER_OTEL_EXPORTER_OTLP_ENDPOINT: this.OTEL_EXPORTER_OTLP_ENDPOINT,
265271
UV_USE_IO_URING: this.UV_USE_IO_URING,
266272
};

0 commit comments

Comments
 (0)