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

Add with_unit method for metrics API #431

Merged
merged 3 commits into from
Jan 21, 2021

Conversation

ozerovandrei
Copy link
Contributor

Add with_unit method to CounterBuilder, SumObserverBuilder,
UpDownSumObserverBuilder, ValueObserverBuilder structs.

Add set_unit method to Descriptor struct.

For #276

Add `with_unit` method to `CounterBuilder`, `SumObserverBuilder`,
`UpDownSumObserverBuilder`, `ValueObserverBuilder` structs.

Add `set_unit` method to `Descriptor` struct.
@ozerovandrei ozerovandrei requested a review from a team January 18, 2021 13:31
@codecov
Copy link

codecov bot commented Jan 18, 2021

Codecov Report

Merging #431 (87ad7ef) into master (c31a449) will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
+ Coverage   48.78%   48.80%   +0.01%     
==========================================
  Files          66       66              
  Lines        5450     5450              
==========================================
+ Hits         2659     2660       +1     
+ Misses       2791     2790       -1     
Impacted Files Coverage Δ
opentelemetry/src/metrics/descriptor.rs 29.41% <0.00%> (ø)
opentelemetry/src/metrics/observer.rs 60.00% <ø> (ø)
...ntelemetry/src/sdk/metrics/aggregators/ddsketch.rs 77.14% <0.00%> (+0.19%) ⬆️

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 c31a449...87ad7ef. Read the comment docs.

Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks!

Make the `config` property of the `Descriptor` `pub(crate)` and use it
directly in metric builders.
Copy link
Member

@jtescher jtescher 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 thanks @ozerovandrei

@jtescher jtescher merged commit 6212399 into open-telemetry:master Jan 21, 2021
@ozerovandrei ozerovandrei deleted the metrics-with_unit branch January 21, 2021 05:55
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.

3 participants