1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-10 09:50:58 +02:00
opentelemetry-go/bridge/opentracing
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
..
internal Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
migration Rename CurrentSpan to SpanFromContext & SetCurrentSpan to ContextWithSpan (#379) 2019-12-11 08:51:32 -08:00
bridge.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
mix_test.go Rename CurrentSpan to SpanFromContext & SetCurrentSpan to ContextWithSpan (#379) 2019-12-11 08:51:32 -08:00
util.go Rename GetTracer to Tracer (#347) 2019-11-25 09:46:07 -08:00
wrapper.go Rename CurrentSpan to SpanFromContext & SetCurrentSpan to ContextWithSpan (#379) 2019-12-11 08:51:32 -08:00