Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attribute name to type warning message. #3124

Merged
merged 5 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Adds environment variables for log exporter
([#3037](https://github.com/open-telemetry/opentelemetry-python/pull/3037))

- Add attribute name to type warning message.
([3124](https://github.com/open-telemetry/opentelemetry-python/pull/3124))

## Version 1.15.0/0.36b0 (2022-12-09)

- Regenerate opentelemetry-proto to be compatible with protobuf 3 and 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ def _clean_attribute(
return tuple(cleaned_seq)

_logger.warning(
"Invalid type %s for attribute value. Expected one of %s or a "
"Invalid type %s for attribute '%s' value. Expected one of %s or a "
"sequence of those types",
type(value).__name__,
key,
[valid_type.__name__ for valid_type in _VALID_ATTR_VALUE_TYPES],
)
return None
Expand Down