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

Deprecate old explicit bounds, add message for explicit bounds #255

Closed
wants to merge 2 commits into from

Conversation

bogdandrutu
Copy link
Member

This is required in order for the protocol to develope in the future and support adding
different other types of bounds. With this change it is backwards compatible to add multiple
bound types and embed them into an oneof (wire compatible).

On any service (receiver) if the deprecated field is received the only operation required
is to reassign the deprecated field to the new embeded repeated field in the message.

Signed-off-by: Bogdan Drutu bogdandrutu@gmail.com

This is required in order for the protocol to develope in the future and support adding
different other types of bounds. With this change it is backwards compatible to add multiple
bound types and embed them into an oneof (wire compatible).

On any service (receiver) if the deprecated field is received the only operation required
is to reassign the deprecated field to the new embeded repeated field in the message.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu bogdandrutu requested review from a team as code owners January 29, 2021 23:22
@bogdandrutu
Copy link
Member Author

@@ -496,24 +500,11 @@ message DoubleHistogramDataPoint {
// Otherwise all option fields and "buckets" field must be omitted in which case the
// distribution of values in the histogram is unknown and only the total count and sum are known.

repeated double deprecated_explicit_bounds = 7 [deprecated=true];
Copy link
Contributor

Choose a reason for hiding this comment

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

For my own understanding, we're not supporting JSON compatibility yet, so this kind of deprecation (with an immediate rename) is ok?

Copy link
Member

Choose a reason for hiding this comment

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

This will also break Collector's build because the field name is used in the codebase, but that's acceptable for now.
What's probably more important is that once we update Collector translation code to use the new explicit_bounds field we are going to break semantic compatibility with existing senders / receivers. (Alternatively, we can look at the deprecated field as well, but not sure if we want to do that).

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 am deprecating the field and plan to accept it in the receiver and translate it into the new format

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure this answered my question. Can we rename here? Does this break a JSON implementation?

I understand from a PROTO standpoint, this isn't breaking, but this would break text-based version (IIUC). Do we not have text-based usage yet so only proto matters?

Copy link
Member

Choose a reason for hiding this comment

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

It does break JSON. This is acceptable, since JSON is currently declared Alpha: https://github.com/open-telemetry/opentelemetry-proto#maturity-level and we allow breaking changes while in Alpha.

@bogdandrutu
Copy link
Member Author

Needs a decision on #259 and #258

@jmacd
Copy link
Contributor

jmacd commented Mar 3, 2021

I intend to send an alternate to this PR, in which I propose the approach described here: #259 (comment)

Specifically, this would:

  1. make the oneof cover "buckets" which include both boundaries and counts in a specific format
  2. make counts be double, not uint64, to support sampling use-cases (e.g., Statsd).

@jmacd
Copy link
Contributor

jmacd commented Mar 15, 2021

The group has discussed support for #272.

@jmacd jmacd closed this Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants