Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2874](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2874))
- `opentelemetry-instrumentation-confluent-kafka` Fix to allow `topic` to be extracted from `kwargs` in `produce()`
([#2901])(https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2901)
- `opentelemetry-instrumentation-pymongo` Fix type-related errors in certain usages of the PyMongo span `DB_MONGODB_COLLECTION` attribute and trace error status descriptions
([#2010](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2010))

### Breaking changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def started(self, event: monitoring.CommandStartedEvent):
)
span.set_attribute(SpanAttributes.DB_NAME, event.database_name)
span.set_attribute(SpanAttributes.DB_STATEMENT, statement)
if collection:
if collection and isinstance(collection, str):
span.set_attribute(
SpanAttributes.DB_MONGODB_COLLECTION, collection
)
Expand Down Expand Up @@ -185,7 +185,7 @@ def failed(self, event: monitoring.CommandFailedEvent):
if span is None:
return
if span.is_recording():
span.set_status(Status(StatusCode.ERROR, event.failure))
span.set_status(Status(StatusCode.ERROR, str(event.failure)))
try:
self.failed_hook(span, event)
except (
Expand Down