hs-opentelemetry-propagator-w3c

Trace propagation via HTTP headers following the w3c tracestate spec.

https://github.com/iand675/hs-opentelemetry#readme

Stackage Nightly 2026-06-01:1.0.0.0
Latest on Hackage:1.0.0.0

See all snapshots hs-opentelemetry-propagator-w3c appears in

BSD-3-Clause licensed by Ian Duncan, Jade Lovelace
Maintained by [email protected]
This version can be pinned in stack with:hs-opentelemetry-propagator-w3c-1.0.0.0@sha256:666cd59079141ea6d43fd7329f364ae6b5c38897487551c91d4d98891e79cccf,1988

Module documentation for 1.0.0.0

hs-opentelemetry-propagator-w3c

hs-opentelemetry-propagator-w3c

Changes

Changelog for hs-opentelemetry-propagator-w3c

Unreleased

1.0.0.0 - 2026-05-29

  • propagatorNames renamed to propagatorFields and now returns actual header names (traceparent, tracestate) instead of tracecontext, conforming to the spec Fields requirement
  • Fix multi-header tracestate inbound: all tracestate headers are now combined per RFC 7230 before parsing (previously only the first was used)
  • Fix: reject traceparent with all-zero trace-id or parent-id (W3C spec requires these to be non-zero)

0.1.0.0

Added

  • Complete W3C tracestate header parsing and encoding support
  • tracestateParser for parsing W3C tracestate headers according to specification
  • encodeTraceState function for serializing TraceState to W3C format
  • encodeTraceStateFull for serializing complete TraceState without HTTP header limits
  • encodeTraceStateMultiple for splitting TraceState into multiple headers with size constraints
  • decodeTraceStateMultiple for combining multiple tracestate headers per RFC7230
  • Proper validation of tracestate keys and values per W3C spec
  • Support for up to 32 tracestate entries as per specification
  • Multi-tenant key format support (tenant@vendor)
  • Automatic removal of oversized entries (>128 chars) as per W3C truncation guidance
  • RFC7230-compliant header field combining with comma separation
  • Comprehensive test coverage for tracestate functionality

Changed

  • encodeSpanContext now includes tracestate in returned tuple
  • decodeSpanContext now properly decodes and validates tracestate headers

Dependencies

  • Added text dependency for tracestate text processing

0.0.1.4

  • Support newer dependencies

0.0.1.1

  • Update to hs-opentelemetry-api == 0.0.2.*

0.0.1.0

  • Initial release