Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace DistributedContext with more specific interfaces #140

Closed
rochdev opened this issue Jun 19, 2019 · 1 comment
Closed

Replace DistributedContext with more specific interfaces #140

rochdev opened this issue Jun 19, 2019 · 1 comment
Labels
area:api Cross language API specification issue spec:context Related to the specification/context directory
Milestone

Comments

@rochdev
Copy link
Member

rochdev commented Jun 19, 2019

The current DistributedContext API is trying to handle too many concerns, which is why an EntryMetadata needs to be added to every Entry which makes it a confusing and difficult to use interface.

These are the separate concerns that the current API is handling:

  • Propagating context within the process
  • Propagating context to the next process
  • Propagating context across the entire trace

There is no use case for a TTL >1 && <services.

I propose to use more specific interfaces instead that will be cleaner and specific to the use case at hand. This will be much easier to use, and anything specific to a single use case will not be mixed with other properties in a single metadata object.

The new API would look like this instead:

  • DistributedContext: This would handle propagation to the next service (single hop).
  • LocalContext: This would handle propagation within a single process.
  • TraceContext: This would handle propagation across the entire trace. This is the equivalent of OpenTracing's baggage items

All of them would be simple maps of strings (and any other types that make sense). They could be attached to the SpanContext to easily make them available everywhere, but another benefit of having different interfaces is that this doesn't have to be the case.

This API would also be much more idiomatic in dynamic languages, while still being strongly typed and easy to understand in more verbose languages.

@SergeyKanzhelev SergeyKanzhelev added this to the API revision: 07-2019 milestone Jun 20, 2019
@tedsuo tedsuo added the area:api Cross language API specification issue label Jul 11, 2019
@iredelmeier iredelmeier added the spec:context Related to the specification/context directory label Jul 30, 2019
@SergeyKanzhelev SergeyKanzhelev modified the milestones: API revision: 07-2019, Alpha v0.3 Sep 27, 2019
@tedsuo
Copy link
Contributor

tedsuo commented Dec 4, 2019

This has work has been moved to an otep, closing for now: open-telemetry/oteps#66

@tedsuo tedsuo closed this as completed Dec 4, 2019
TuckTuckFloof pushed a commit to TuckTuckFloof/opentelemetry-specification that referenced this issue Oct 15, 2020
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 21, 2024
This link was broken on a repo restructuring. The name of the spec was also changed from Correlation-Context to Baggage (see w3c/baggage#27)
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this issue Oct 23, 2024
This link was broken on a repo restructuring. The name of the spec was also changed from Correlation-Context to Baggage (see w3c/baggage#27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue spec:context Related to the specification/context directory
Projects
None yet
Development

No branches or pull requests

4 participants