Skip to content

Commit 0653c7a

Browse files
committed
code cleanup
1 parent 8472ddb commit 0653c7a

File tree

5 files changed

+18
-45
lines changed

5 files changed

+18
-45
lines changed

buildscripts/semantic-convention/templates/registry/common.j2

Lines changed: 0 additions & 37 deletions
This file was deleted.

buildscripts/semantic-convention/templates/registry/schema_url-h.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
{# ========================================================================== #}
2929

3030
{{ template.set_file_name("schema_url.h") }}
31-
{% import 'common.j2' as c %}
3231

3332
{# ========================================================================== #}
3433

buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,17 @@
2626
* buildscripts/semantic-convention/templates/registry/semantic_attributes-h.j2
2727
*/
2828
{# ========================================================================== #}
29+
{#
30+
DESIGN NOTES:
31+
- Use the debug flag to dump the semantic convention data
32+
in the generated output, to inspect it.
33+
#}
34+
{# ========================================================================== #}
2935

3036
{% set debug = false %}
3137

3238
{% set file_name = ctx.output + (ctx.root_namespace | snake_case) ~ "_attributes.h" %}
3339
{{ template.set_file_name(file_name) }}
34-
{% import 'common.j2' as c %}
3540

3641
{% set attributes = ctx.attributes | list %}
3742
{% set enum_attributes = attributes | select("enum") | rejectattr("name", "in", ctx.excluded_attributes) | list %}
@@ -45,7 +50,7 @@ k{{ attribute.name | pascal_case }}
4550
{% endmacro %}
4651

4752
{% macro attribute_type(attribute) %}
48-
{{ attribute.type | enum_type | map_text("cpp_types", "FIXME") }}
53+
{{ attribute.type | enum_type | map_text("cpp_types") }}
4954
{% endmacro %}
5055

5156
{% macro enum_namespace_name(attribute) %}
@@ -56,10 +61,6 @@ k{{ attribute.name | pascal_case }}
5661
k{{ member.id | pascal_case }}
5762
{% endmacro %}
5863

59-
{% macro stable_class_ref(const_name, separator) %}
60-
{{ctx.stable_package_name}}.{{ctx.root_namespace}}_attributes{{separator}}{{const_name}}
61-
{% endmacro %}
62-
6364
{% set cpp_attribute_namespace = attribute_namespace(ctx) %}
6465

6566
{# ========================================================================== #}

buildscripts/semantic-convention/templates/registry/semantic_metrics-h.j2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
{% set file_name = ctx.output + (ctx.root_namespace | snake_case) ~ "_metrics.h" %}
4444
{{ template.set_file_name(file_name) }}
45-
{% import 'common.j2' as c %}
4645

4746
{% set metrics = ctx.metrics | list %}
4847

buildscripts/semantic-convention/templates/registry/weaver.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Copyright The OpenTelemetry Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4+
# This file is the main file for weaver,
5+
# used to generate semantic conventions,
6+
# for opentelemetry-cpp.
7+
#
8+
# For doc on weaver:
9+
# https://github.com/open-telemetry/weaver
10+
#
11+
# For doc on the semantic conventions:
12+
# https://github.com/open-telemetry/semantic-conventions
13+
#
14+
415
params:
516
# excluded namespaces will not be generated
617
excluded_namespaces: [ios, aspnetcore, signalr, android, dotnet, jvm, kestrel, v8js, veightjs, go, nodejs]

0 commit comments

Comments
 (0)