-
Notifications
You must be signed in to change notification settings - Fork 895
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
Clarifying DistributedContext purpose #240
Conversation
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
**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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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.
specification/overview.md
Outdated
**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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-Authored-By: Christian Neumüller <christian+github@neumueller.me>
There was a problem hiding this 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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. |
@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. |
There was a problem hiding this 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.
* 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>
* 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>
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.