-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
update OTLP to v0.8.0 #3572
update OTLP to v0.8.0 #3572
Conversation
…, DoubleDataPoint, DoubleHistogramDataPoint, DoubleSummaryDataPoint, DoubleExemplar
I've started the work to upgrade OTLP here, but I would like some feedback from @open-telemetry/collector-approvers on the way to proceed forward. The linter is currently failing because of various deprecated types still in use:
Would it be better for me to continue working through those messages in this PR or disable the linter for |
Thanks for starting this @codeboten ! We can probably silence the linter temporarily. However, I think we need a more elaborate plan for this change. Changing this repo is relatively easy. I think contrib is going to be much bigger volume of changes. We need to time the change such that it is fully doable in the period between the releases (2 weeks). Perhaps once this PR is ready, don't merge it yet, prepare the PR for corresponding contrib changes and only after ensuring contrib is also ready to be merged move forward. Contrib changes may turn out to be a lot of work and we may need to ask codeowners of each component to prepare a PR for their own component (or maybe not if it turns out to be not as laborious as I am imagining). |
I tested the contrib repo with the changes as they are in this PR currently and things worked, this is expected as I'm not yet renaming things in pdata. We could potentially move ahead with this PR, which gives us at least the new protos and is not too hard to review. The remaining items in the checklist could be tackled in following PRs and potentially even done in parallel. Thoughts @tigrannajaryan & @bogdandrutu? |
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 would not "fix" #3534 since this change indeed does the upgrade, but does not do the right transformations to/from deprecated fields/metric types.
# disabling to suppress deprecation warnings when updating OTLP to v0.8.0 | ||
# in support of breaking up the work into more manageable PRs |
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.
We should create an issue, or document this in #3534 that is left to deal with for later.
Reading the proto changes in 0.8.0 it seems like the wire format changes are not breaking? From what I see it should remain wire-format compatible with previous version (fields in some messages are added but not removed and some messages are renamed - all of which is backward compatible). Is that correct or I am missing a breaking change? |
@@ -1192,18 +1192,18 @@ func (es DoubleDataPointSlice) RemoveIf(f func(DoubleDataPoint) bool) { | |||
// Must use NewDoubleDataPoint function to create new instances. | |||
// Important: zero-initialized instance is not valid for use. | |||
type DoubleDataPoint struct { |
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.
What's the future plan? Will this struct be renamed NumberDataPoint
?
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.
Yes
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 plan on renaming this next and tackling removing IntDataPoint at the same time.
func (ms DoubleDataPoint) Value() float64 { | ||
return (*ms.orig).Value | ||
return (*ms.orig).GetAsDouble() | ||
} |
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.
Do we plan to remove Value
and expose 2 different types of values, the int
and the double
in a future PR?
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.
Yes
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 think we can merge this and do the rest of the work in followup PRs
Description:
Updating OTLP to version 0.8.0. Here is a checklist of the progress so far:
DoubleGauge
,DoubleSum
,DoubleHistogram
,DoubleSummary
,DoubleDataPoint
,DoubleHistogramDataPoint
,DoubleSummaryDataPoint
, andDoubleExemplar
ExemplarSlice
to use[]*otlpmetrics.Exemplar
IntSum
,IntGauge
https://github.com/open-telemetry/opentelemetry-proto/blob/f3b0ee0861d304f8f3126686ba9b01c106069cb0/opentelemetry/proto/metrics/v1/metrics.proto#L156IntDataPoint
https://github.com/open-telemetry/opentelemetry-proto/blob/f3b0ee0861d304f8f3126686ba9b01c106069cb0/opentelemetry/proto/metrics/v1/metrics.proto#L554IntExemplar
https://github.com/open-telemetry/opentelemetry-proto/blob/f3b0ee0861d304f8f3126686ba9b01c106069cb0/opentelemetry/proto/metrics/v1/metrics.proto#L675IntHistogram
https://github.com/open-telemetry/opentelemetry-proto/blob/f3b0ee0861d304f8f3126686ba9b01c106069cb0/opentelemetry/proto/metrics/v1/metrics.proto#L170Link to tracking Issue: Part of #3534