/** * Pure, vendor-neutral mapping `IdentityEnvelope → senpi.* attributes`, set per-trace * at each root span's birth. Per-runtime identity can't live on the process-global OTel * resource — N wallets share one process, so a resource attribute would stamp the first * runtime's value onto everyone's telemetry (see `otel-sdk.ts` SCOPING note). * * The actual stamping is HyperDX's `setTraceAttributes` (rides every span in the trace), * called at the root-span seams — NOT here: importing `@hyperdx/node-opentelemetry` * captures its OTLP transport env at module-load, so it must stay behind code that runs * only after `initOtelSdk()`. It covers spans only; logs carry the same identity via the * async-context bag the logger reads at emit time (see `trackingContext.identityAttributes`). */ import type { Attributes } from "@opentelemetry/api"; import type { IdentityEnvelope } from "../telemetry/identity.js"; /** * Map the runtime {@link IdentityEnvelope} to its `senpi.*` trace attributes. Optional * envelope fields are omitted when unset rather than emitted as empty/undefined, so a * trace never carries a hollow `senpi.config.hash=""`. */ export declare function identityTraceAttributes(identity: IdentityEnvelope): Attributes; /** * Stamp the runtime's `senpi.*` identity onto the active trace via HyperDX's * `setTraceAttributes`, which rides every span in the trace. Call it from a root-span * seam (inside an active span's context) so the whole trace carries the identity. * * No-ops until the SDK is initialised: the import is dynamic so `@hyperdx/node-opentelemetry` * (which captures its OTLP env at module-load) only loads after `initOtelSdk()`, and there is * no trace to stamp before then. Best-effort: a failure is logged and swallowed — tracing must * never break trading. */ export declare function setTraceIdentityAttributes(identity: IdentityEnvelope): Promise; //# sourceMappingURL=trace-identity.d.ts.map