Circle V2 API Docs
    Preparing search index...

    Unified configuration for baggage-driven span enrichment.

    Combines two related concerns into a single consumer-defined config:

    • domainAttributes: maps camelCase param keys (as they appear on tRPC inputs, service params, job params) to canonical, component-agnostic OTel attribute names. Drives extractDomainAttributes / withDomainContext so domain IDs flow into baggage at every framework entry point. Canonical names (the values) are automatically allowlisted on the BaggageSpanProcessor.

    • additionalKeys: extra canonical keys to allowlist on the BaggageSpanProcessor that aren't derived from input params (e.g. user.id, user.role, user.entityId set directly via addBaggageEntries from the auth middleware).

    Defining both halves in one place avoids drift between the param-extraction map and the span-processor allowlist, and keeps domain identifiers out of the observability package itself.

    type BaggageConfig = {
        additionalKeys?: string[];
        domainAttributes: Record<string, string>;
    }
    Index

    Properties

    additionalKeys?: string[]
    domainAttributes: Record<string, string>