Circle V2 API Docs
    Preparing search index...

    Type Alias WithSpanOptions

    type WithSpanOptions = {
        component?: string;
        links?: Link[];
        root?: boolean;
    }
    Index

    Properties

    component?: string

    Sets a component span attribute used for slicing traces in Datadog (filtering, coloring, dashboards). All backend spans share a single Datadog service (api) because Vercel's OTLP forwarding sets service.name at the resource level and Datadog's hosted OTLP intake does not honor per-span service.name overrides. The component tag gives the per-layer separation we want without per-span service overrides.

    Components can be disabled at runtime via the OTEL_DISABLED_COMPONENTS env var (comma-separated). When disabled, withSpan runs fn without creating a new span.

    links?: Link[]

    Span links to attach to the new span (e.g. linking a job's run span back to the enqueuer's span across a queue boundary). Links correlate spans in different traces without making one a child of the other.

    root?: boolean

    When true, start the span as the root of a new trace, ignoring any active parent span. Used with links to break an unbounded trace into per-unit traces that still correlate.