diff --git a/semconv/templates/registry/go/helpers.j2 b/semconv/templates/registry/go/helpers.j2 index 59b3e0f4a..acef4abfe 100644 --- a/semconv/templates/registry/go/helpers.j2 +++ b/semconv/templates/registry/go/helpers.j2 @@ -14,7 +14,7 @@ {%- endmacro -%} {%- macro to_go_name(fqn="", pkg="") -%} -{%- if pkg != "" -%} +{%- if pkg != "" and fqn != pkg -%} {%- set n = pkg | length -%} {%- if pkg == fqn[:n] -%} {%- set fqn = fqn[n:] -%} diff --git a/semconv/v1.36.0/systemconv/metric.go b/semconv/v1.36.0/systemconv/metric.go index fddec3fca..58e692bb9 100644 --- a/semconv/v1.36.0/systemconv/metric.go +++ b/semconv/v1.36.0/systemconv/metric.go @@ -25,8 +25,8 @@ type CPUModeAttr string var ( // CPUModeUser is the standardized value "user" of CPUModeAttr. CPUModeUser CPUModeAttr = "user" - // CPUMode is the standardized value "system" of CPUModeAttr. - CPUMode CPUModeAttr = "system" + // CPUModeSystem is the standardized value "system" of CPUModeAttr. + CPUModeSystem CPUModeAttr = "system" // CPUModeNice is the standardized value "nice" of CPUModeAttr. CPUModeNice CPUModeAttr = "nice" // CPUModeIdle is the standardized value "idle" of CPUModeAttr.