Skip to content

Commit 1ddb232

Browse files
authored
Add empty tags by default to transaction (#4683)
Seems like some `before_send`s out there might assume tags without safe access as we found out during dogfooding.
1 parent 53005b9 commit 1ddb232

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sentry_sdk/opentelemetry/span_processor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def _root_span_to_transaction_event(self, span: ReadableSpan) -> Optional[Event]
225225
if span.resource.attributes:
226226
contexts[OTEL_SENTRY_CONTEXT] = {"resource": dict(span.resource.attributes)}
227227

228+
event.setdefault("tags", {})
228229
event.update(
229230
{
230231
"type": "transaction",

0 commit comments

Comments
 (0)