evalution
    Preparing search index...

    Function mergeSpans

    • Merges a later snapshot of a span into an earlier one.

      OpenTelemetry reports each span twice — at onStart (creation-time attributes only) and at onEnd (the full set) — and the two snapshots can carry complementary data. This unions their attributes and lets any defined field on incoming update existing, so nothing recorded at start is lost when the span ends, and end-only fields (status, timings, token usage, …) are filled in.

      Parameters

      Returns Span