/** * Mutable holder for dev-server telemetry identity that is only known after * connect: application id, branch, user, and org. * * The preload starts OpenTelemetry early (before the ai-service loads) with only * the static resource it can derive from the environment, and passes * `getTelemetryIdentity` as the SDK's dynamic attribute source. * `configureTelemetry` fills this in once it has fetched the application config, * so spans and exported log records created after connect carry the full * identity — the same set the SDK used to put on the resource — without * re-initializing the SDK. Earlier startup signals simply carry the static * resource. Metrics deliberately do not carry identity (cardinality). * * The holder lives on `globalThis`, not in a module variable: the packaged CLI * contains TWO copies of this module (one esbuild-bundled into the CLI dist, * one under node_modules that the bin's `telemetry-preload` import resolves * to). The preload's copy hands the getter to the exporting SDK while the * bundled copy's `configureTelemetry` calls the setter, so a per-module * variable would split into two holders and identity would never reach an * exported span or log record. */ declare global { var __superblocksTelemetryIdentity: Record | undefined; } /** Replaces the identity. Undefined values are dropped so absent fields are omitted. */ export declare function setTelemetryIdentity(next: Record): void; /** Current identity; passed to the SDK as the dynamic span-attribute source. */ export declare function getTelemetryIdentity(): Record; //# sourceMappingURL=identity.d.ts.map