Skip to content

add W3C Trace Context propagation to Envelope #1

Description

@s3d-i

Summary

Add an optional W3C Trace Context carrier to Envelope so Swift and Python consumers can join work into one distributed trace. Existing message_id and correlation_id remain protocol-level identifiers.

Proposed change

  • Define a small trace-context message containing traceparent and optional tracestate.
  • Add it as optional envelope metadata without changing existing field numbers.
  • Treat missing or invalid context as absent; never reject an otherwise valid envelope.
  • Regenerate the committed Swift and Python protobuf outputs.

Out of scope

  • OTel manifest or custom semantic conventions.
  • SDK instrumentation, exporters, Collector configuration, metrics, or logs.
  • Creating one span per envelope or token event.
  • W3C baggage propagation.

Acceptance criteria

  • Existing envelopes remain wire-compatible.
  • Context propagation behavior is documented.
  • No OpenTelemetry runtime dependency is added to this package.
  • npm run bootstrap:check passes.

Downstream Swift and Python instrumentation will be tracked separately.

References: OpenTelemetry context propagation · W3C Trace Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions