Skip to content

Commit a4de2d0

Browse files
fix(cli-v3): forward TRIGGER_WORKER_INSTANCE_NAME into managed run process env
1 parent 105f489 commit a4de2d0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ export class RunnerEnv {
236236
OTEL_EXPORTER_OTLP_ENDPOINT: this.OTEL_EXPORTER_OTLP_ENDPOINT,
237237
TRIGGER_OTEL_EXPORTER_OTLP_ENDPOINT: this.OTEL_EXPORTER_OTLP_ENDPOINT,
238238
UV_USE_IO_URING: this.UV_USE_IO_URING,
239+
// Forward the worker instance name (spec.nodeName on k8s) into the run
240+
// process so it can be attached as an OTEL host/node resource attribute.
241+
// Without this, run spans/logs exported to an off-node OTLP collector
242+
// have no host and Datadog tags them issue_type:empty_hostname.
243+
TRIGGER_WORKER_INSTANCE_NAME: this.TRIGGER_WORKER_INSTANCE_NAME,
239244
};
240245

241246
// Filter out undefined values

0 commit comments

Comments
 (0)