open-telemetry / weaver

OTel Weaver lets you easily develop, validate, document, and deploy semantic conventions
Apache License 2.0
52 stars 18 forks source link

`semconv_grouped_metrics` group by root namespace uses group.id instead of metric_name to determine root namespace #289

Open lmolkova opened 1 month ago

lmolkova commented 1 month ago

Try excluding v8js namespace

params:
  excluded_namespaces: [v8js]

templates:
  - pattern: semantic_metrics.j2
    filter: >
      semconv_grouped_metrics({
        "exclude_root_namespace": $excluded_namespaces
      })

As a result, v8js metrics will be generated in the file veightjs - since that's what is used in the group name.

Workaround

use excluded_namespaces: [v8js, veightjs]

(v8js is still needed because for attribute, root namespace is determined correctly)

Expected behavior Group ID is not used to determine root namespace

Additional context https://github.com/open-telemetry/semantic-conventions/pull/1314

lmolkova commented 1 month ago

Same problem on events + both use group id to filter deprecated things:

https://github.com/open-telemetry/weaver/blob/4886aaf17e0f6b6d0725add2f3f793d25dd448ad/defaults/jq/semconv.jq#L70C20-L70C23