fix(semconv): avoid duplicate metric recording without attributes - #8849
fix(semconv): avoid duplicate metric recording without attributes#8849jstar0 wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8849 +/- ##
=====================================
Coverage 88.4% 88.4%
=====================================
Files 331 331
Lines 21001 21001
=====================================
Hits 18572 18572
Misses 2429 2429 🚀 New features to boost your workflow:
|
|
The remaining
All code-relevant checks for this head are passing. No unrelated generated-document link edits are proposed in this PR. |
MrAlias
left a comment
There was a problem hiding this comment.
The production change is focused, but the regression coverage needs to establish the one-call behavior before this is ready.
|
Addressed the requested regression coverage in
Verification:
|
…y-attrs # Conflicts: # CHANGELOG.md
|
Resolved the |
Fixes #8780
The retained v1.32.0-v1.34.0 generated metric helpers record through the empty-attributes fast path and then fall through to the general attribute path. This causes histogram helpers to export duplicate count/sum observations and invokes gauge helpers twice.
This updates all 60 affected helpers across the three retained semantic-convention versions and adds a semconvkit AST regression check so generated metric helpers must return after their no-attribute fast path.
Validation:
go test ./semconv/v1.32.0/...go test ./semconv/v1.33.0/...go test ./semconv/v1.34.0/...go test ./semconvkitfrominternal/toolsmake precommitcompleted generation, lint, README, and module checks, then stopped at the existingbridge/opentracinggRPC test with a server prefaceEOF; the changed semconv scopes pass.