From b36a76ca848caf9596d0c28a65216dfcb2c25c69 Mon Sep 17 00:00:00 2001 From: David Cotten Date: Fri, 19 Jan 2024 22:15:08 -0700 Subject: [PATCH] Fix: Include key in attribute sequence warning --- opentelemetry-api/src/opentelemetry/attributes/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opentelemetry-api/src/opentelemetry/attributes/__init__.py b/opentelemetry-api/src/opentelemetry/attributes/__init__.py index 724c931c82..783d18163e 100644 --- a/opentelemetry-api/src/opentelemetry/attributes/__init__.py +++ b/opentelemetry-api/src/opentelemetry/attributes/__init__.py @@ -68,9 +68,10 @@ def _clean_attribute( # Reject attribute value if sequence contains a value with an incompatible type. if element_type not in _VALID_ATTR_VALUE_TYPES: _logger.warning( - "Invalid type %s in attribute value sequence. Expected one of " + "Invalid type %s in attribute '%s' value sequence. Expected one of " "%s or None", element_type.__name__, + key, [ valid_type.__name__ for valid_type in _VALID_ATTR_VALUE_TYPES