Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

RFC: Trace Identifiers #123

Open
3 of 5 tasks
tedsuo opened this issue Jul 11, 2018 · 13 comments
Open
3 of 5 tasks

RFC: Trace Identifiers #123

tedsuo opened this issue Jul 11, 2018 · 13 comments

Comments

@tedsuo
Copy link
Member

tedsuo commented Jul 11, 2018

This is the Tracking issue for the Trace Identifiers RFC.

Proposal: https://github.com/opentracing/specification/blob/master/rfc/trace_identifiers.md

Summary

The OpenTracing SpanContext interface is extended to include SpanID and TraceID accessors.

The OpenTracing model of computation specifies two primary object types, Spans and Traces, but does not specify identifiers for these objects. Identifiers for the two primary object types make it easier to correlate tracing data with data in other systems, simplify important tasks, and allow the creation of reusable trace observers.

Current Status

Work is ready to begin, but there is one final bikeshed to paint: what to call these methods. SpanID and TraceID are the ideal names. However, these method names are already in use by some tracers, but with more specialized return types. Adding them to the SpanContext interface risks causing collisions and potentially creating breaking changes for some tracers. Using a slightly different method name would reduce the chance of a collision, at the expense of being... not TraceID or SpanID. Once we pick a satisfactory term, we can quickly add this feature to all of the OpenTracing APIs.

Let's debate naming conventions on gitter and see if we can get consensus.

Related Issues and Discussions

@tedsuo
Copy link
Member Author

tedsuo commented Jul 12, 2018

We may want to consider unwrapping as part of the same RFC. Typecasting will no longer be reliable if OpenTracing middleware becomes common.

Relevant Issues and PRs

@austinlparker
Copy link
Member

For reference, this was added to the C# Tracer in opentracing/opentracing-csharp#96

@carlosalberto
Copy link
Contributor

@austinlparker Wondering if the names should be updated to the latest that the Java API has (ToTraceId() and ToSpanId()) - something to consider ;)

@austinlparker
Copy link
Member

austinlparker commented Oct 15, 2018 via email

@felixbarny
Copy link

felixbarny commented Oct 15, 2018 via email

@austinlparker
Copy link
Member

I've forked this convo into the C# repo so we don't clog up this thread.

@codeman9
Copy link

I really like this idea. Right now the fact that SpanContext is essentially empty in the opentracing interface is a little strange and leaves open too many things. Something like traceId and spanId accessors with common naming would be wonderful to put in this interface.

@ghostsquad
Copy link

any movement on this?

@jsvensson
Copy link

Also curious about this one - with new tools like Grafana's Tempo that can correlate logs to traces and take you straight to the trace view from the log viewer, I definitely want to log the trace ID for that purpose.

@yurishkuro
Copy link
Member

I updated the status in the description - it's implemented in Java/JS only. The RFC was approved, but the spec was not updated.

Unlikely to see much traction here since all efforts moved to OpenTelemetry.

@jsvensson
Copy link

Thanks for the update! We don't yet have any tracing where I work, but I'm trying to champion it and get it going. I've experimented with both OpenTracing and OpenTelemetry, but thus far I've leaned towards OpenTracing due to otel-go not yet having a stable enough API. I think we can manage that though.

@mukul-brevo
Copy link

Hi @yurishkuro

Is there any progress on adding the methods to Golang API?

I see the thread is inactive for past 2 years

@yurishkuro
Copy link
Member

There won't be any progress, the project is deprecated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants