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

Clarifying DistributedContext purpose #240

Conversation

toumorokoshi
Copy link
Member

The DistributedContext section in the overview did not include examples,
and started by describing the data structure rather than the purpose.

Describing the purpose and use cases first will help better understand
the use cases.

The DistributedContext section in the overview did not include examples,
and started by describing the data structure rather than the purpose.

Describing the purpose and use cases first will help better understand
the use cases.
specification/overview.md Outdated Show resolved Hide resolved
**DistributedContext** is an abstract data type that represents collection of entries.
Each key of **DistributedContext** is associated with exactly one value. **DistributedContext** is serializable,
to facilitate propagating it not only inside the process but also across process boundaries.
The **DistributedContext** exists to store labels that describe the context of an operation an application performs. It is intended to enable context that are custom to the application or integrations in contrast to other contexts, such as `SpanContext`. For a specific operation, there should not be multiple **DistributedContext** instances.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **DistributedContext** exists to store labels that describe the context of an operation an application performs. It is intended to enable context that are custom to the application or integrations in contrast to other contexts, such as `SpanContext`. For a specific operation, there should not be multiple **DistributedContext** instances.
The **DistributedContext** stores labels that describe the context of an operation an application performs. It is intended to enable contexts that are custom to the application or integrations in contrast to other contexts, such as `SpanContext`. For a specific operation, there should not be multiple **DistributedContext** instances.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently github only lets me add one suggestion per line to a batch. I'll add this in a second commit.

**DistributedContext** is an abstract data type that represents collection of entries.
Each key of **DistributedContext** is associated with exactly one value. **DistributedContext** is serializable,
to facilitate propagating it not only inside the process but also across process boundaries.
The **DistributedContext** exists to store labels that describe the context of an operation an application performs. It is intended to enable context that are custom to the application or integrations in contrast to other contexts, such as `SpanContext`. For a specific operation, there should not be multiple **DistributedContext** instances.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is intended to enable contexts that are custom to the application or integrations

Is that so? I thought the Distributed Context, as specified now, was more or less what TagMap was in OpenCensus. But Ted commented in #242 that there will be a new proposal this week.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm struggling for the right way to word this, but I wanted a way to help someone understand that this is a more free-form set of tags / labels that developers can use for their own stack's purposes.

For example, at Zillow we will probably use this to propagate originating service, which there is no spec around.

When I say "integrations" I was thinking about telemetry SaaS providers. I'm sure there's keys that are valuable to propagate for them (maybe also and originating service key).

Of course I may have misunderstood this. And yes maybe Ted will have a completely new proposal that changes the purpose dramatically.

specification/overview.md Outdated Show resolved Hide resolved
Co-Authored-By: Christian Neumüller <christian+github@neumueller.me>
Copy link
Member

@c24t c24t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after fixing typos.


**DistributedContext** is used to annotate telemetry with the name:value pair **Entry**.
Those values can be used to add dimension to the metric or additional contest properties to logs and traces.
**DistributedContext** is a collection of key-value `Entry` pairs, with each key of associated with exactly one value. **DistributedContext** is serializable,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**DistributedContext** is a collection of key-value `Entry` pairs, with each key of associated with exactly one value. **DistributedContext** is serializable,
**DistributedContext** is a collection of key-value `Entry` pairs, with each key associated with exactly one value. **DistributedContext** is serializable,

**DistributedContext** is an abstract data type that represents collection of entries.
Each key of **DistributedContext** is associated with exactly one value. **DistributedContext** is serializable,
to facilitate propagating it not only inside the process but also across process boundaries.
The **DistributedContext** exists to store labels that describe the context of an operation an application performs. It is intended to enable context that are custom to the application or integrations in contrast to other contexts, such as `SpanContext`. Only one **DistributedContext** should be associated with any particular operation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The **DistributedContext** exists to store labels that describe the context of an operation an application performs. It is intended to enable context that are custom to the application or integrations in contrast to other contexts, such as `SpanContext`. Only one **DistributedContext** should be associated with any particular operation.
The **DistributedContext** exists to store labels that describe the context of an operation an application performs. It is intended to enable context that is custom to the application or integrations in contrast to other contexts, such as `SpanContext`. Only one **DistributedContext** should be associated with any particular operation.

Assuming you want "context" to be singular here, I don't know about "integrations" though.

@yurishkuro
Copy link
Member

There are a couple proposals in flight (open-telemetry/oteps#42, open-telemetry/oteps#36), which will result in "distributed context" term going away, so maybe worth waiting before merging this PR.

@SergeyKanzhelev
Copy link
Member

@yurishkuro this PR doesn't make anything worse in the current spec. Context separation is planned for v0.3 which is few weeks away so I'd suggest we will merge this PR for now.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably change substantially when we split it into Correlations and Baggage. I'm ok with the current form.

@SergeyKanzhelev SergeyKanzhelev merged commit 2a9d428 into open-telemetry:master Oct 3, 2019
SergeyKanzhelev pushed a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
* Clarifying DistributedContext

The DistributedContext section in the overview did not include examples,
and started by describing the data structure rather than the purpose.

Describing the purpose and use cases first will help better understand
the use cases.

* Fix grammar and simplify wording

Co-Authored-By: Christian Neumüller <christian+github@neumueller.me>
TuckTuckFloof pushed a commit to TuckTuckFloof/opentelemetry-specification that referenced this pull request Oct 15, 2020
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
* Clarifying DistributedContext

The DistributedContext section in the overview did not include examples,
and started by describing the data structure rather than the purpose.

Describing the purpose and use cases first will help better understand
the use cases.

* Fix grammar and simplify wording

Co-Authored-By: Christian Neumüller <christian+github@neumueller.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants