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

Update opentelemetry-proto to latest version. #1600

Merged
merged 3 commits into from
Sep 1, 2020

Conversation

anuraaga
Copy link
Contributor

Currently, java instrumentation smoke tests fail because we use JSON. collector file exporter writes as JSON and the tests read the JSON. But currently the JSON is not compatible between collector and Java because of renamed enums. Updating the proto will allow us to continue to develop against new versions of the collector.

I'm guessing the intent of the metrics protocol change is for the SDK to also adopt similar data structures. I'm not doing that in this PR since I only want to make the SDK JSON-compatible with the latest collectors - at the same time I've probably made them somewhat compatible for metrics too. The conversion of summary to histogram is clearly not ideal, converting double values into long counts, but I think semantically it may capture something reasonable. Anyways given before the change, the SDK isn't compatible at all for metrics with the latest collector, this is probably an improvement until rewriting the SDK.

.setPercentile(valueAtPercentile.getPercentile())
.setValue(valueAtPercentile.getValue())
.build());
// TODO(jkwatson): Value of histogram should be long?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no remembrance of what this might have meant.

@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #1600 into master will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1600      +/-   ##
============================================
- Coverage     91.56%   91.50%   -0.06%     
  Complexity      985      985              
============================================
  Files           117      117              
  Lines          3603     3603              
  Branches        314      314              
============================================
- Hits           3299     3297       -2     
- Misses          208      209       +1     
- Partials         96       97       +1     
Impacted Files Coverage Δ Complexity Δ
...y/sdk/metrics/aggregator/DoubleMinMaxSumCount.java 96.07% <0.00%> (-3.93%) 6.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bac7193...43cf88b. Read the comment docs.

@jkwatson
Copy link
Contributor

What version of the proto is this updated to? I haven't seen a release since 0.4.0.

@anuraaga
Copy link
Contributor Author

Just latest master

32a0c7b519d6e26749a44d7ca8b5a39b08d9ef00

Collector seems to track master so I don't know if the proto has a real release process. But if collector moves with master I think SDK needs to as well to keep up.

@jkwatson
Copy link
Contributor

I would prefer not to try to chase master with this. I think there are still changes happening rapidly to the metrics protobuf definitions. I would greatly prefer to only used released versions of the proto.

@carlosalberto
Copy link
Contributor

I would greatly prefer to only used released versions of the proto.

+1 on this.

@anuraaga
Copy link
Contributor Author

@bogdandrutu Will you be doing a proto release soon? We should unblock the trace proto incompatibility soon.

@bogdandrutu
Copy link
Member

Release will happen Monday, you only need to resync and regenerate the code because of open-telemetry/opentelemetry-proto#214, but Java code will not change

@anuraaga
Copy link
Contributor Author

JFYI, I removed the dependency on go / java being protocol compatible in the instrumentation repo's smoke tests so we don't have a rush on fixing this with regards to instrumentation.

@jkwatson
Copy link
Contributor

0.5.0 was just released: https://github.com/open-telemetry/opentelemetry-proto/releases/tag/v0.5.0

So, please update and we'll get this into the 0.8.0 release tomorrow!

@bogdandrutu
Copy link
Member

@jkwatson hopefully the collector is changed by tonight so we can give a try before releasing

@jkwatson
Copy link
Contributor

@jkwatson hopefully the collector is changed by tonight so we can give a try before releasing

If not, I think we're ok delaying a day. Should we hold off on merging this, after it's been updated for 0.5.0, do you think?

@bogdandrutu
Copy link
Member

Before releasing this change I would give a try to the collector. I am getting very close to finish that, is under review. After that gets merged will announce on the metrics gitter

@bogdandrutu
Copy link
Member

All collector code is merged, waiting for the CI to publish a docker image for that build

@anuraaga
Copy link
Contributor Author

Updated submodule to match the tag version.

@jkwatson
Copy link
Contributor

jkwatson commented Sep 1, 2020

Should we merge this, or can you test it against the latest collector before merging, @anuraaga ?

@anuraaga
Copy link
Contributor Author

anuraaga commented Sep 1, 2020

I haven't really been using metrics yet it'd be quite a chore for me to test it. Maybe merge and give a chance to allow someone (@bogdandrutu ?) to test with the snapshot before releasing?

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks! I'm going to merge and try to test this against the latest collector docker build.

@jkwatson jkwatson merged commit 69478c2 into open-telemetry:master Sep 1, 2020
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.

None yet

5 participants