Skip to content

Commit 1061d96

Browse files
authored
Fix: Include key in attribute sequence warning (#3639)
* Fix: Include key in attribute sequence warning * Add CHANGELOG entry ---------
1 parent 153c658 commit 1061d96

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Include key in attribute sequence warning
11+
([#3639](https://github.com/open-telemetry/opentelemetry-python/pull/3639))
1012
- Upgrade markupsafe, Flask and related dependencies to dev and test
1113
environments ([#3609](https://github.com/open-telemetry/opentelemetry-python/pull/3609))
1214
- Handle HTTP 2XX responses as successful in OTLP exporters

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ def _clean_attribute(
6868
# Reject attribute value if sequence contains a value with an incompatible type.
6969
if element_type not in _VALID_ATTR_VALUE_TYPES:
7070
_logger.warning(
71-
"Invalid type %s in attribute value sequence. Expected one of "
71+
"Invalid type %s in attribute '%s' value sequence. Expected one of "
7272
"%s or None",
7373
element_type.__name__,
74+
key,
7475
[
7576
valid_type.__name__
7677
for valid_type in _VALID_ATTR_VALUE_TYPES

0 commit comments

Comments
 (0)