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

refactor(sdk/metrics): add histogramAggs method #2648

Closed

Conversation

1046102779
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #2648 (ac088d0) into main (24414b2) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2648     +/-   ##
=======================================
- Coverage   75.6%   75.6%   -0.1%     
=======================================
  Files        172     172             
  Lines      11551   11548      -3     
=======================================
- Hits        8736    8733      -3     
  Misses      2605    2605             
  Partials     210     210             
Impacted Files Coverage Δ
sdk/metric/selector/simple/simple.go 100.0% <100.0%> (ø)

@hanyuancheung hanyuancheung added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Mar 3, 2022
Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

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

I don't know if refactoring to a dedicated method is worth it here, since that method isn't used anywhere else.

func (selectorInexpensive) AggregatorFor(descriptor *sdkapi.Descriptor, aggPtrs ...*aggregator.Aggregator) {
switch descriptor.InstrumentKind() {
case sdkapi.GaugeObserverInstrumentKind:
lastValueAggs(aggPtrs)
case sdkapi.HistogramInstrumentKind:
Copy link
Member

Choose a reason for hiding this comment

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

Just commenting here because it took me a few seconds to understand why this code was removed.
The sumAggs method does the same thing, so there's no need for the repetition.

@Aneurysm9
Copy link
Member

With the new metrics API from #2587 landed, this entire SDK is on the chopping block and slated for replacement. I'm not sure it's worth tinkering at the edges of it at this time.

@1046102779 1046102779 closed this Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants