Skip to content

Commit

Permalink
Fix: Include key in attribute sequence warning (#3639)
Browse files Browse the repository at this point in the history
* Fix: Include key in attribute sequence warning

* Add CHANGELOG entry

---------
  • Loading branch information
davidecotten committed Jan 31, 2024
1 parent 153c658 commit 1061d96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Include key in attribute sequence warning
([#3639](https://github.com/open-telemetry/opentelemetry-python/pull/3639))
- Upgrade markupsafe, Flask and related dependencies to dev and test
environments ([#3609](https://github.com/open-telemetry/opentelemetry-python/pull/3609))
- Handle HTTP 2XX responses as successful in OTLP exporters
Expand Down
3 changes: 2 additions & 1 deletion opentelemetry-api/src/opentelemetry/attributes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1061d96

Please sign in to comment.