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 942713a02d
Replace span relationship with a potentially remote parent context (#451)
This PR removes the non-compliant ChildOf and FollowsFrom interfaces
and the Relation type, which were inherited from OpenTracing via the
initial prototype. Instead allow adding a span context to the go
context as a remote span context and use a simple algorithm for
figuring out an actual parent of the new span, which was proposed for
the OpenTelemetry specification.

Also add a way to ignore current span and remote span context in go
context, so we can force the tracer to create a new root span - a span
with a new trace ID.

That required some moderate changes in the opentracing bridge - first
reference with ChildOfRef reference type becomes a local parent, the
rest become links. This also fixes links handling in the meantime. The
downside of the approach proposed here is that we can only set the
remote parent when creating a span through the opentracing API.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-02-04 08:55:03 -08:00
..
testtrace Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -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 Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
b3_propagator.go Reorganize propagation code (shrink PR 381) (#444) 2020-01-28 10:13:46 -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 Rename CurrentSpan to SpanFromContext & SetCurrentSpan to ContextWithSpan (#379) 2019-12-11 08:51:32 -08:00
sampler.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
trace_context_propagator.go make trace.TraceContext as default context propagator (#456) 2020-02-03 09:28:39 -08:00