Skip to content

Commit

Permalink
Exclude namespaces that aren't useful in jvm environments (#54)
Browse files Browse the repository at this point in the history
* Exclude namespaces that aren't useful in jvm environments

* Fix test
  • Loading branch information
jack-berg authored Mar 26, 2024
1 parent 97bf96c commit ede8688
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 67 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion buildscripts/templates/SemanticAttributes.java.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ void available() {
isValidClass("io.opentelemetry.semconv.incubating.HerokuIncubatingAttributes");
isValidClass("io.opentelemetry.semconv.incubating.HostIncubatingAttributes");
isValidClass("io.opentelemetry.semconv.incubating.HttpIncubatingAttributes");
isValidClass("io.opentelemetry.semconv.incubating.IosIncubatingAttributes");
isValidClass("io.opentelemetry.semconv.incubating.JvmIncubatingAttributes");
isValidClass("io.opentelemetry.semconv.incubating.K8sIncubatingAttributes");
isValidClass("io.opentelemetry.semconv.incubating.LogIncubatingAttributes");
Expand Down

0 comments on commit ede8688

Please # to comment.