Skip to content

Commit

Permalink
Exclude namespaces that aren't useful in jvm environments
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Mar 15, 2024
1 parent 379efda commit 9915cb7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 66 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.

0 comments on commit 9915cb7

Please # to comment.