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

Remove bound metric instruments from the API #2352

Closed
wants to merge 1 commit into from

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Nov 5, 2021

This demonstrates how much code we can remove by eliminating bound instruments. I believe this is worthwhile and I would rather focus on optimizing the code path for extracting baggage and the performance of RecordBatch(), not individual bound instrument APIs.

Fixes #2351

@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #2352 (652c9cf) into main (7ce58f3) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2352     +/-   ##
=======================================
- Coverage   73.6%   73.5%   -0.2%     
=======================================
  Files        175     175             
  Lines      12419   12333     -86     
=======================================
- Hits        9144    9065     -79     
+ Misses      3041    3035      -6     
+ Partials     234     233      -1     
Impacted Files Coverage Δ
internal/metric/global/meter.go 89.3% <ø> (-0.5%) ⬇️
metric/metric_instrument.go 89.1% <ø> (-1.4%) ⬇️
metric/metrictest/meter.go 94.4% <ø> (-1.8%) ⬇️
metric/sdkapi/noop.go 88.8% <ø> (+27.3%) ⬆️
metric/sdkapi/sdkapi.go 100.0% <ø> (ø)
sdk/metric/sdk.go 80.0% <100.0%> (-0.2%) ⬇️

Copy link
Contributor

@MadVikingGod MadVikingGod left a comment

Choose a reason for hiding this comment

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

+18 -518, best kind of PRs.

I like the thrust of the code, there needs a bit of attention to lint and changelog etc.

Copy link
Contributor

@evantorrie evantorrie left a comment

Choose a reason for hiding this comment

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

+1 but needs a CHANGELOG entry

@jmacd
Copy link
Contributor Author

jmacd commented Nov 12, 2021

I like the thrust of the code, there needs a bit of attention to lint and changelog etc.

Thanks. I did't want to finish this PR until I had a few people agreeing I should.

@MrAlias
Copy link
Contributor

MrAlias commented Nov 12, 2021

I did't want to finish this PR until I had a few people agreeing I should.

SGTM, looks like a worth while change.

@MrAlias
Copy link
Contributor

MrAlias commented Nov 15, 2021

golangci-lint in ./sdk/metric
benchmark_test.go:63:6: `makeManyLabels` is unused (deadcode)
func makeManyLabels(n int) [][]attribute.KeyValue {
     ^
make: *** [Makefile:139: lint] Error 1

@MadVikingGod
Copy link
Contributor

I was asked to take over getting this PR to the finish line. A new PR at #2399 fixes all of the outstanding issues.

@jmacd jmacd closed this Nov 16, 2021
@jmacd jmacd deleted the jmacd/remove_bound branch July 7, 2022 15:08
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.

Consider removing bound metric instrument support
5 participants