Skip to content

Commit

Permalink
Make sure the trace context in event payload is always set.
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Jun 27, 2023
1 parent abba90f commit 9b8a3cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sentry_sdk/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ def _drop(cause, ty):
if has_tracing_enabled(options):
if self._span is not None:
contexts["trace"] = self._span.get_trace_context()
else:
contexts["trace"] = self.get_trace_context()
else:
contexts["trace"] = self.get_trace_context()

Expand Down

0 comments on commit 9b8a3cf

Please sign in to comment.