Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude namespaces that aren't useful in jvm environments #54

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading