Skip to content

Commit 072d8a8

Browse files
authored
refactor(semantic-conventions): use weaver 'file_name' template config (#5689)
1 parent 04545fa commit 072d8a8

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

scripts/semconv/templates/registry/stable/attributes.ts.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- template.set_file_name(ctx.stability ~ "_attributes.ts") }}
21
{%- import 'docstring.ts.j2' as d %}
32
/*
43
* Copyright The OpenTelemetry Authors

scripts/semconv/templates/registry/stable/metrics.ts.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- template.set_file_name(ctx.stability ~ "_metrics.ts") }}
21
{%- import 'docstring.ts.j2' as d %}
32
/*
43
* Copyright The OpenTelemetry Authors

scripts/semconv/templates/registry/stable/weaver.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,39 +22,38 @@ default_comment_format: jsdoc
2222
# (e.g. https://github.com/open-telemetry/semantic-conventions/issues/1777).
2323
templates:
2424
- pattern: attributes.ts.j2
25-
# Remove file name prefix when per-pattern params are available https://github.com/open-telemetry/weaver/issues/288
25+
file_name: "stable_attributes.ts"
2626
filter: >
2727
semconv_attributes({
2828
"stable_only": true
2929
}) | {
30-
stability: "stable",
3130
attributes: .
3231
}
3332
application_mode: single
3433
- pattern: attributes.ts.j2
34+
file_name: "experimental_attributes.ts"
3535
filter: >
3636
semconv_attributes({
3737
"exclude_stability": ["stable", "", null]
3838
}) | {
39-
stability: "experimental",
4039
attributes: .
4140
}
4241
application_mode: single
4342
- pattern: metrics.ts.j2
43+
file_name: "stable_metrics.ts"
4444
filter: >
4545
semconv_metrics({
4646
"stable_only": true
4747
}) | {
48-
stability: "stable",
4948
metrics: .
5049
}
5150
application_mode: single
5251
- pattern: metrics.ts.j2
52+
file_name: "experimental_metrics.ts"
5353
filter: >
5454
semconv_metrics({
5555
"exclude_stability": ["stable", "", null]
5656
}) | {
57-
stability: "experimental",
5857
metrics: .
5958
}
6059
application_mode: single

0 commit comments

Comments
 (0)