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

Expose non-nullable metric types #2208

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

bogdandrutu
Copy link
Member

This is possible because:

  • Gogo proto (and protobuf) will not unmarshal any nil element in a oneof;
  • Set type will initialize the oneof wrapper as well as the element;

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

@bogdandrutu bogdandrutu requested a review from a team November 23, 2020 22:02
@codecov
Copy link

codecov bot commented Nov 23, 2020

Codecov Report

Merging #2208 (290bfeb) into master (cb60143) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2208      +/-   ##
==========================================
- Coverage   91.99%   91.92%   -0.08%     
==========================================
  Files         271      271              
  Lines       15779    15653     -126     
==========================================
- Hits        14516    14389     -127     
  Misses        860      860              
- Partials      403      404       +1     
Impacted Files Coverage Δ
consumer/simple/metrics.go 98.79% <ø> (-0.09%) ⬇️
internal/goldendataset/metric_gen.go 100.00% <ø> (ø)
internal/processor/filterexpr/matcher.go 100.00% <ø> (ø)
...iver/internal/scraper/diskscraper/disk_metadata.go 100.00% <ø> (ø)
...l/scraper/filesystemscraper/filesystem_metadata.go 100.00% <ø> (ø)
...iver/internal/scraper/loadscraper/load_metadata.go 100.00% <ø> (ø)
...nternal/scraper/networkscraper/network_metadata.go 100.00% <ø> (ø)
...nal/scraper/processesscraper/processes_metadata.go 100.00% <ø> (ø)
...nternal/scraper/processscraper/process_metadata.go 100.00% <ø> (ø)
...iver/internal/scraper/swapscraper/swap_metadata.go 100.00% <ø> (ø)
... and 5 more

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 cb60143...290bfeb. Read the comment docs.

This is possible because:

* Gogo proto (and protobuf) will not unmarshal any nil element in a oneof;
* Set type will initialize the oneof wrapper as well as the element;

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu bogdandrutu merged commit 47ffc51 into open-telemetry:master Nov 24, 2020
@bogdandrutu bogdandrutu deleted the notnilmetrics branch November 24, 2020 22:23
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.

2 participants