Skip to content

Commit

Permalink
alternative weaver config to skip attributes that accidentally don't …
Browse files Browse the repository at this point in the history
…have an explicit stability; this is a more general fix to skip the current case (network.interface.name), per suggestion from Liudmila
  • Loading branch information
trentm committed Jan 22, 2025
1 parent 1022386 commit 3b786b1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/semconv/templates/registry/stable/weaver.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

params:
# Exclude `network.interface.name` for now because https://github.com/open-telemetry/semantic-conventions/issues/1777
excluded_attributes: ["messaging.client_id", "network.interface.name"]
excluded_attributes: ["messaging.client_id"]

# https://github.com/open-telemetry/weaver/blob/main/crates/weaver_forge/README.md#comment-filter
comment_formats:
Expand All @@ -17,12 +16,14 @@ comment_formats:
escape_backslashes: true
default_comment_format: jsdoc

# `exclude_stability` includes `"", null` to skip attributes that
# accidentally do not have a stability set (e.g. https://github.com/open-telemetry/semantic-conventions/issues/1777).
templates:
- pattern: attributes.ts.j2
# Remove file name prefix when per-pattern params are available https://github.com/open-telemetry/weaver/issues/288
filter: >
semconv_attributes({
"exclude_stability": ["experimental"]
"exclude_stability": ["experimental", "", null]
}) | {
stability: "stable",
attributes: .
Expand All @@ -31,7 +32,7 @@ templates:
- pattern: attributes.ts.j2
filter: >
semconv_attributes({
"exclude_stability": ["stable"]
"exclude_stability": ["stable", "", null]
}) | {
stability: "experimental",
attributes: .
Expand All @@ -40,7 +41,7 @@ templates:
- pattern: metrics.ts.j2
filter: >
semconv_metrics({
"exclude_stability": ["experimental"]
"exclude_stability": ["experimental", "", null]
}) | {
stability: "stable",
metrics: .
Expand All @@ -49,7 +50,7 @@ templates:
- pattern: metrics.ts.j2
filter: >
semconv_metrics({
"exclude_stability": ["stable"]
"exclude_stability": ["stable", "", null]
}) | {
stability: "experimental",
metrics: .
Expand Down

0 comments on commit 3b786b1

Please sign in to comment.