CALL_CONTEXT variable

Property an in-flight call's context is kept under, on the request itself, so that afterCall can finish the span beforeCall started. Never serialized, see hideContextFromJson().

Signature:

CALL_CONTEXT: unique symbol

Remarks

The string deliberately keeps the retired @imqueue/dd-trace name. Symbol.for looks up the PROCESS-GLOBAL symbol registry, so the literal is the handle by which one copy of this package hands a call context to another — and it is exported, so third-party code can rebuild it with its own Symbol.for call to read the in-flight span off a request. Changing it would mean a beforeCall storing under one key while an afterCall reads another: afterCall returns early, span.finish() never runs, and the span is dropped. That failure is worse than a crash — no error anywhere, the traces simply go quiet — and the generated declaration types this as a plain symbol, so no consumer would get a compile error either.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.