1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-16 10:19:23 +02:00
opentelemetry-go/api/trace/testtrace
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
..
b3_propagator_benchmark_test.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
b3_propagator_data_test.go Reorganize propagation code (shrink PR 381) (#444) 2020-01-28 10:13:46 -08:00
b3_propagator_test.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
event.go rename Message in Event to Name (#389) 2019-12-18 10:13:05 -08:00
generator.go Add inspectable test tracer (#353) 2019-12-04 14:00:35 -08:00
package.go Add inspectable test tracer (#353) 2019-12-04 14:00:35 -08:00
span_test.go rename Message in Event to Name (#389) 2019-12-18 10:13:05 -08:00
span.go rename Message in Event to Name (#389) 2019-12-18 10:13:05 -08:00
trace_context_propagator_benchmark_test.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
trace_context_propagator_test.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
tracer_test.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00
tracer.go Replace span relationship with a potentially remote parent context (#451) 2020-02-04 08:55:03 -08:00