Skip to content

tracing-opentelemetry-0.4.0

@jtescher jtescher tagged this 13 May 04:56
The [OpenTelemetry Propagation
Spec](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/context/api-propagators.md)
has been changed from operating primarily on `SpanContext`s to a more
generic `Context` struct which is a propagation mechanism that carries
execution-scoped values across API boundaries and between logically
associated execution units.

The following APIs are updated to facilitate this change:

* OpenTelemetrySpanExt's `set_parent` now accepts a reference to an
  extracted parent context.
* OpenTelemetrySpanExt's `context` now returns a context.

Additionally the need to sample spans before their context can be
injected into `Carrier`s necessitates that a `Sampler` is stored in the
`OpenTelemetryLayer`. Accordingly:

* `OpenTelemetryLayer::with_tracer(tracer)` has been removed in favor of
  `tracing_opentelemetry::layer().with_tracer(tracer).with_sampler(sampler)`

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Assets 2
Loading