diff --git a/build.gradle.kts b/build.gradle.kts index f85b962..ce8e62b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -98,6 +98,8 @@ fun generateTask(taskName: String, incubating: Boolean) { "--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\"", "-Dfilter=${filter}", "-DclassPrefix=${classPrefix}", "-Dpkg=$packageNameArg", diff --git a/buildscripts/templates/SemanticAttributes.java.j2 b/buildscripts/templates/SemanticAttributes.java.j2 index f1f38b8..af1e515 100644 --- a/buildscripts/templates/SemanticAttributes.java.j2 +++ b/buildscripts/templates/SemanticAttributes.java.j2 @@ -37,7 +37,8 @@ {%- set filtered_attributes = attributes_and_templates | list %} {%- endif %} {%- set filtered_enums = filtered_attributes | selectattr('is_enum', 'equalto', true) | list %} -{%- if filtered_attributes | count > 0 %} +{%- set excluded_namespaces_list = excluded_namespaces.replace("\"", "").split(' ') %} +{%- if root_namespace not in excluded_namespaces_list and filtered_attributes | count > 0 %} /* * Copyright The OpenTelemetry Authors * SPDX-License-Identifier: Apache-2.0 diff --git a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java b/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java deleted file mode 100644 index f89b801..0000000 --- a/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/IosIncubatingAttributes.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright The OpenTelemetry Authors - * SPDX-License-Identifier: Apache-2.0 - */ - -package io.opentelemetry.semconv.incubating; - -import static io.opentelemetry.api.common.AttributeKey.stringKey; - -import io.opentelemetry.api.common.AttributeKey; - -// DO NOT EDIT, this is an Auto-generated file from -// buildscripts/templates/SemanticAttributes.java.j2 -@SuppressWarnings("unused") -public final class IosIncubatingAttributes { - - /** - * This attribute represents the state the application has transitioned into at the occurrence of - * the event. - * - *
Notes: - * - *