Skip to content

Commit 34d11d5

Browse files
Petter Fribergsrikanthccv
andauthored
Add attribute key to mixed types warning message (#3162)
Co-authored-by: Srikanth Chekuri <[email protected]>
1 parent 209093b commit 34d11d5

File tree

1 file changed

+2
-1
lines changed
  • opentelemetry-api/src/opentelemetry/attributes

1 file changed

+2
-1
lines changed

opentelemetry-api/src/opentelemetry/attributes/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def _clean_attribute(
8585
# use equality instead of isinstance as isinstance(True, int) evaluates to True
8686
elif element_type != sequence_first_valid_type:
8787
_logger.warning(
88-
"Mixed types %s and %s in attribute value sequence",
88+
"Attribute %r mixes types %s and %s in attribute value sequence",
89+
key,
8990
sequence_first_valid_type.__name__,
9091
type(element).__name__,
9192
)

0 commit comments

Comments
 (0)