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

Add initial spec for DistributedContext.Entry #73

Merged
merged 5 commits into from
Jun 10, 2019

Conversation

songy23
Copy link
Member

@songy23 songy23 commented Jun 6, 2019

Updates #41 and #46.

Most are a copy-and-paste from https:/census-instrumentation/opencensus-specs/blob/master/tags/TagMap.md#tag by renaming Tag* -> Entry*.

Next PR will be TagMap -> DistributedContext.

Followed open-telemetry/opentelemetry-java#11 (comment):

Package - dctx or distributedcontext, depending on the language norms.
Map of elements - DistributedContext
The elements - Entry

/cc @c24t @dinooliva @mayurkale22 @rghetia

@jmacd
Copy link
Contributor

jmacd commented Jun 6, 2019

Is there room to debate the term DistributedContext? I'd like to know the reasoning.

@bogdandrutu
Copy link
Member

@jmacd happy to hear options :) I am personally also not convinced about the name.

@SergeyKanzhelev
Copy link
Member

As part of this PR., can you please remove copied parts from https:/open-telemetry/opentelemetry-specification/blob/master/work_in_progress/specification/tags/TagMap.md So we know what's left to cover from original specs in a new specs

@SergeyKanzhelev
Copy link
Member

For #46 - please copy pieces of terminology into this document: https:/open-telemetry/opentelemetry-specification/blob/master/terminology.md#tags

Terminology document explains the terms and used and how their purpose

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

See comments

@@ -0,0 +1,95 @@
# Summary
Copy link
Member

Choose a reason for hiding this comment

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

if this is an API document - it lacks description of supported operations and types. Please add

Copy link
Member

Choose a reason for hiding this comment

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

Just looked at @jmacd's PR. I believe it can be merged from there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Has there been a discussion about keeping or dropping the OC concept of mutators, e.g., being able to delete a key from a context?

@jmacd
Copy link
Contributor

jmacd commented Jun 7, 2019

TagMap is a fine name, as argued here:
open-telemetry/opentelemetry-java#11

Is there a record of the past discussion, where people expressed confusion over TagMap?

@bogdandrutu
Copy link
Member

@jmacd so far the reason I know is that OpenTracing had tags before as a different thing. Also some people had a concern that if we call tags users cannot use this for other purposes than "telemetry" - which arguably should not, but I can see reasons to not have 2 different distributed contexts.

@songy23
Copy link
Member Author

songy23 commented Jun 7, 2019

Is there a record of the past discussion, where people expressed confusion over TagMap?

Discussions can be found at open-telemetry/opentelemetry-java#11. That issue has more detailed background too.

OT: Tied to the Span, and part of SpanContext (which is immutable).
OC: Exist independently, can be propagated without a Span.

@carlosalberto
Copy link
Contributor

For the record, I really liked Baggage ;)

@SergeyKanzhelev
Copy link
Member

Please, let's create another issue for this and will move on with the names we chose. Let's not block PR on the past decision, which @songy23 wasn't even part of.

(I realize it might have been a wrong decision. Like many others we did.)


## EntryValue

`EntryValue` is a string. It MUST contain only printable ASCII (codes between
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does the character-set restriction come from?

Copy link
Member Author

Choose a reason for hiding this comment

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

@songy23
Copy link
Member Author

songy23 commented Jun 8, 2019

@SergeyKanzhelev Thanks for the feedback - all addressed. For now I kept the name as open-telemetry/opentelemetry-java#11. Will wait on #75.

@songy23
Copy link
Member Author

songy23 commented Jun 10, 2019

Based on our conversation today we'll stick with the new names for now. Any other comments expect the naming?

- **EntryValue** is a string that contains only printable ASCII (codes between 32 and 126).
- **EntryMetadata** contains properties associated with an **Entry**.
For now only the property **EntryTTL** is defined.
- **EntryTTL** is an integer that represents number of hops an entry can propagate.
Copy link
Member

Choose a reason for hiding this comment

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

What's the maximum value of EntryTTL (e.g. 2^16 - 2)?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't have a limit on EntryTTL. Since we've defined a specific Unlimited (+Inf) value, IMO we don't need an explicit maximum here.

Copy link
Member

Choose a reason for hiding this comment

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

In languages which support BigInt (e.g. Python by default uses bigint), we expect users to pass in a huge number (e.g. 12345678901234567890) and we should handle it without giving error?

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 think this is more a language-specific issue since integer in different languages can have different range. Filed #93 to see if it's worth adding an explicit maximum.

- **EntryMetadata** contains properties associated with an **Entry**.
For now only the property **EntryTTL** is defined.
- **EntryTTL** is an integer that represents number of hops an entry can propagate.
Anytime a sender serializes an entry, sends it over the wire and receiver unserializes
Copy link
Member

Choose a reason for hiding this comment

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

One clarification question, if the receiver simply bypass the entries (e.g. proxy), it is not considered one hop?
We might need to clarify what happens if there are multiple entries, do we allow some of them to bypass (without decreasing the TTL) while others to decrement TTL by 1?

Copy link
Member Author

Choose a reason for hiding this comment

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

This case can be handled by the PropagationFilter: https:/census-instrumentation/opencensus-specs/blob/master/tags/TagMap.md#tagpropagationfilter, which will be added in the next PR.

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

LGTM.

@SergeyKanzhelev SergeyKanzhelev merged commit bfb2180 into open-telemetry:master Jun 10, 2019
@songy23 songy23 deleted the distributedcontext branch June 10, 2019 22:42
SergeyKanzhelev pushed a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
* Add initial spec for DistributedContext.Entry

* Remove WIP TagMap specs.

* Add Entry related terminology.

* Add description of supported operations and types.
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