MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resourceAttributes

Function resourceAttributes

apps/cloud/src/observability/telemetry.ts:79–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77let isolateStartedAt: number | null = null;
78
79const resourceAttributes = (): Record<string, string | number> => {
80 isolateInstanceId ??= crypto.randomUUID();
81 isolateStartedAt ??= Date.now();
82 return {
83 "service.instance.id": isolateInstanceId,
84 "executor.isolate_started_at": new Date(isolateStartedAt).toISOString(),
85 ...(env.GIT_COMMIT_SHA === undefined ? {} : { "executor.commit_sha": env.GIT_COMMIT_SHA }),
86 };
87};
88
89// Module-scope: one provider per isolate, never shut down. The provider holds
90// the SimpleSpanProcessor + OTLP exporter, so any tracer reference captured by

Callers 2

makeTelemetryLiveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected