Update semconv template and 1.40.0 to use Enabled for metrics by dashpole · Pull Request #8172 · open-telemetry/opentelemetry-go (original) (raw)

added 2 commits

April 9, 2026 19:37

@dashpole

@dashpole

@dashpole

@dashpole dashpole marked this pull request as ready for review

April 10, 2026 12:58

@dashpole

dmathieu

@pellared

pellared

@dashpole

pellared added a commit to pellared/opentelemetry-go that referenced this pull request

Apr 23, 2026

@dashpole @pellared

…elemetry#8172)

Part of open-telemetry#7800

This adds Enabled checks to the generated semconv metric instruments. I also opted to regenerate the 1.40.0 conventions given this is not a behavioral change.

While implementing it, I did get the sense that this should be redundant. Callers should be checking Enabled before making these calls because they should avoid building attribute sets. But it does still make sense to have this as a fallback for cases where callers haven't done that.


Co-authored-by: Robert Pająk pellared@hotmail.com

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})