Skip to content

Commit

Permalink
Add attribute name to type warning message. (#3124)
Browse files Browse the repository at this point in the history
  • Loading branch information
aebrahim authored Jan 12, 2023
1 parent 3ff277e commit 090efb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
- 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))
- Add db metric name to semantic conventions
([#3115](https://github.com/open-telemetry/opentelemetry-python/pull/3115))

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 @@ -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

0 comments on commit 090efb4

Please sign in to comment.