Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Make tracestate a list instead of a map to preserve ordering.#84

Merged
bogdandrutu merged 4 commits intocensus-instrumentation:masterfrom
bogdandrutu:tracestatelist
Aug 30, 2018
Merged

Make tracestate a list instead of a map to preserve ordering.#84
bogdandrutu merged 4 commits intocensus-instrumentation:masterfrom
bogdandrutu:tracestatelist

Conversation

@bogdandrutu
Copy link
Copy Markdown
Contributor

One thing I want to confirm is the name tracestate vs trace_state. I don't like the fact that tracestate is not a real word so all the time the spelling checker triggers on this.

//
// See the https://github.com/w3c/distributed-tracing for more details about this field.
map<string, string> tracestate = 15;
repeated TraceStateEntry trace_state = 15;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: trace_state -> trace_states?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

@bogdandrutu
Copy link
Copy Markdown
Contributor Author

Blocked by one decision in census-instrumentation/opencensus-specs#168.

//
// See the https://github.com/w3c/distributed-tracing for more details about this field.
map<string, string> tracestate = 15;
message Tracestate {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor nit, why don't we break this out into a message of its own, that is, a top-level definition instead of an inlined definition here?

@codefromthecrypt
Copy link
Copy Markdown
Contributor

yes tracestate

}

// The Tracestate on the span.
Tracestate tracestate = 15;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

another option is to have a string and not parse it except to remove your incoming tracestate. OTOH what you have is more flexible for future changes. As mentioned in the spec review "For multi-tenant vendors scenarios '@' sign can be used to prefix vendor name." is highly speculative, and the format isn't well thought through. Usually '@' is not a character promoted for use for various reasons I can think of a few. I wouldn't advertise this in good faith.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ps option for ridding @ is just deleting the advice (ideally also from where it was copy/pasted from). We should not encourage characters that routinely require escaping.

@SergeyKanzhelev
Copy link
Copy Markdown
Member

CC: @lmolkova

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants