1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

use LinkedTo rather than ChildOf for PublicEndpoint (#272)

This causes us to no longer emit missing root spans if we do not have the trace associated with the tracing headers we receive on public endpoints.
This commit is contained in:
Liz Fong-Jones
2019-11-04 14:03:40 +01:00
committed by GitHub
parent ecf3bb9d7c
commit 9f82c642f5
3 changed files with 15 additions and 5 deletions

View File

@@ -60,6 +60,10 @@ func (tr *tracer) Start(ctx context.Context, name string, o ...apitrace.SpanOpti
spanName := tr.spanNameWithPrefix(name)
span := startSpanInternal(tr, spanName, parent, remoteParent, opts)
for _, l := range opts.Links {
span.AddLink(l)
}
span.tracer = tr
if span.IsRecording() {