diff --git a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 index cad0ef12a95..97c0d28858b 100644 --- a/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 +++ b/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2 @@ -52,7 +52,7 @@ import java.util.List; // DO NOT EDIT, this is an Auto-generated file from buildscripts/semantic-convention{{template}} public final class {{class}} { - {%- for attribute in attributes | unique(attribute="fqn") %} + {%- for attribute in attributes if attribute.is_local and not attribute.ref %} /** * {% filter escape %}{{attribute.brief | to_doc_brief}}.{% endfilter %} @@ -72,7 +72,7 @@ public final class {{class}} { {%- endfor %} // Enum definitions - {%- for attribute in attributes | unique(attribute="fqn") %} + {%- for attribute in attributes if attribute.is_local and not attribute.ref %} {%- if attribute.is_enum %} {%- set class_name = attribute.fqn | to_camelcase(True) ~ "Values" %} {%- set type = to_java_return_type(attribute.attr_type.enum_type) %}