Skip to content

Commit e7fa5ba

Browse files
authored
Fix CPUModeSystem variable name (#7233)
Do not trim a package prefix when it is the same as the package name. Assume the name itself has semantic meaning and will not stutter. Fix #7232
1 parent be28c6b commit e7fa5ba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

semconv/templates/registry/go/helpers.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{%- endmacro -%}
1515

1616
{%- macro to_go_name(fqn="", pkg="") -%}
17-
{%- if pkg != "" -%}
17+
{%- if pkg != "" and fqn != pkg -%}
1818
{%- set n = pkg | length -%}
1919
{%- if pkg == fqn[:n] -%}
2020
{%- set fqn = fqn[n:] -%}

semconv/v1.36.0/systemconv/metric.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)