1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-11-30 08:46:54 +02:00
opentelemetry-go/api/trace
Krzesimir Nowak cf7a4d909c
Refactor propagators (#467)
* Remove binary propagators

They are in process of being dropped from the specification and we
haven't be using them anywhere in the project. Can reintroduce them
later.

* Rename Supplier to HTTPSupplier

The supplier is used only in HTTP propagators currently. It's not
clear if it will be useful for binary propagators if they get to be
specified at some point.

* Rework propagation interfaces

The biggest change here is that HTTP extractors return a new context
with whatever information the propagator is able to retrieve from the
supplier. Such interface does not hardcode any extractor's
functionality (like it was before by explicitly returning a span
context and correlation context) and makes it easy to chain multiple
propagators.

Injection part hasn't changed.

* Add Propagators interface

This interface (and its default implementation) is likely going to be
the propagation API used the most. Single injectors, extractors or
propagators are likely going to be used just as parameters to the
Option functions that configure the Propagators implementation.

* Drop noop propagator

It's rather pointless - just create an empty Propagators instance.

* Fix wrong name in docs

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-02-13 23:16:04 -08:00
..
testtrace Refactor propagators (#467) 2020-02-13 23:16:04 -08:00
always_sampler_test.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
always_sampler.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
api.go Add StartOptions to Tracer.WithSpan() (#472) 2020-02-10 21:07:32 -05:00
b3_propagator.go Refactor propagators (#467) 2020-02-13 23:16:04 -08:00
context_test.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
context.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
doc.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
never_sampler_test.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
never_sampler.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
noop_span.go fixed typo (#408) 2020-01-03 09:38:05 -08:00
noop_trace_provider.go Rename GetTracer to Tracer (#347) 2019-11-25 09:46:07 -08:00
noop_trace.go Add StartOptions to Tracer.WithSpan() (#472) 2020-02-10 21:07:32 -05:00
sampler.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
trace_context_propagator.go Refactor propagators (#467) 2020-02-13 23:16:04 -08:00