diff --git a/build.gradle.kts b/build.gradle.kts index 4c649b9..f182e00 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -96,13 +96,14 @@ fun generateTask(taskName: String, incubating: Boolean) { "-v", "$projectDir/$outputDir:/output", "otel/semconvgen:$generatorVersion", "--yaml-root", "/source", - "--continue-on-validation-errors", "compatibility", + "--continue-on-validation-errors", "code", "--template", "/templates/SemanticAttributes.java.j2", "--output", "/output/{{pascal_prefix}}${classPrefix}Attributes.java", "--file-per-group", "root_namespace", // Space delimited list of root namespaces to excluded (i.e. "foo bar") - "-Dexcluded_namespaces=\"ios aspnetcore signalr\"", + "-Dexcluded_namespaces=ios aspnetcore signalr", + "-Dexcluded_attributes=messaging.client_id", "-Dfilter=${filter}", "-DclassPrefix=${classPrefix}", "-Dpkg=$packageNameArg", diff --git a/buildscripts/templates/SemanticAttributes.java.j2 b/buildscripts/templates/SemanticAttributes.java.j2 index af1e515..2e3b310 100644 --- a/buildscripts/templates/SemanticAttributes.java.j2 +++ b/buildscripts/templates/SemanticAttributes.java.j2 @@ -31,10 +31,11 @@ {%- macro stable_class_ref(const_name, separator) -%} {{stablePkg}}.{{ root_namespace | to_camelcase(True) }}Attributes{{separator}}{{const_name}} {%- endmacro %} +{%- set excluded_attributes_list = excluded_attributes.replace("\"", "").split(' ') %} {%- if filter != 'any' %} -{%- set filtered_attributes = attributes_and_templates | select(filter) | list %} +{%- set filtered_attributes = attributes_and_templates | rejectattr("fqn", "in", excluded_attributes) | select(filter) | list %} {%- else %} -{%- set filtered_attributes = attributes_and_templates | list %} +{%- set filtered_attributes = attributes_and_templates | rejectattr("fqn", "in", excluded_attributes) | list %} {%- endif %} {%- set filtered_enums = filtered_attributes | selectattr('is_enum', 'equalto', true) | list %} {%- set excluded_namespaces_list = excluded_namespaces.replace("\"", "").split(' ') %} diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java index d1dd5f2..8873fe9 100644 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java +++ b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/MessagingIncubatingAttributes.java @@ -37,14 +37,6 @@ public final class MessagingIncubatingAttributes { /** A unique identifier for the client that consumes or produces a message. */ public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client.id"); - /** - * Deprecated, use {@code messaging.client.id} instead. - * - * @deprecated Deprecated, use `messaging.client.id` instead. - */ - @Deprecated - public static final AttributeKey MESSAGING_CLIENT_ID = stringKey("messaging.client_id"); - /** * A boolean that is true if the message destination is anonymous (could be unnamed or have * auto-generated name).