diff --git a/semantic-conventions/src/opentelemetry/semconv/model/semantic_attribute.py b/semantic-conventions/src/opentelemetry/semconv/model/semantic_attribute.py index 718bbdd5..a2847ed8 100644 --- a/semantic-conventions/src/opentelemetry/semconv/model/semantic_attribute.py +++ b/semantic-conventions/src/opentelemetry/semconv/model/semantic_attribute.py @@ -345,13 +345,13 @@ class AttributeTemplate(SemanticAttribute): parameter_name: str = "key" @staticmethod - def parse( + def parse_attribute_templates( prefix, semconv_stability, yaml_attributes ) -> "Dict[str, AttributeTemplate]": - """This method parses the yaml representation for semantic attributes - creating the respective SemanticAttribute objects. + """This method parses the yaml representation for attribute templates + creating the respective AttributeTemplate objects. """ - attributes = {} # type: Dict[str, SemanticAttribute] + attributes = {} # type: Dict[str, AttributeTemplate] allowed_keys = ( "id", "type", diff --git a/semantic-conventions/src/opentelemetry/semconv/model/semantic_convention.py b/semantic-conventions/src/opentelemetry/semconv/model/semantic_convention.py index fd00cfec..c5ddbb9e 100644 --- a/semantic-conventions/src/opentelemetry/semconv/model/semantic_convention.py +++ b/semantic-conventions/src/opentelemetry/semconv/model/semantic_convention.py @@ -143,7 +143,7 @@ def __init__(self, group): self.attrs_by_name = SemanticAttribute.parse( self.prefix, self.stability, group.get("attributes") ) - self.attr_templates_by_name = AttributeTemplate.parse( + self.attr_templates_by_name = AttributeTemplate.parse_attribute_templates( self.prefix, self.stability, group.get("attribute_templates") ) diff --git a/semantic-conventions/src/tests/semconv/model/test_semantic_attribute.py b/semantic-conventions/src/tests/semconv/model/test_semantic_attribute.py index d02b77f9..7012172a 100644 --- a/semantic-conventions/src/tests/semconv/model/test_semantic_attribute.py +++ b/semantic-conventions/src/tests/semconv/model/test_semantic_attribute.py @@ -56,7 +56,7 @@ def test_parse_deprecated(load_yaml): def test_parse_attribute_templates(load_yaml): yaml = load_yaml("attribute_templates.yml") - attribute_templates = AttributeTemplate.parse( + attribute_templates = AttributeTemplate.parse_attribute_templates( "prefix", "", yaml.get("attribute_templates") )