Skip to content

Commit d5767c4

Browse files
committed
fix wrong parent ID
1 parent 30d436a commit d5767c4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎sentry_sdk/integrations/boto3/_utils.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import sentry_sdk
44
from sentry_sdk.consts import SPANDATA
5+
from sentry_sdk.traces import NoOpSpan
56
from sentry_sdk.tracing_utils import should_propagate_trace
67

78
if TYPE_CHECKING:
@@ -56,6 +57,10 @@ def _get_propagation_headers(
5657
sentry_sdk.get_client(), ctx.endpoint_url
5758
):
5859
return {}
60+
# `NoOpSpan` is never sent, use scope's span instead.
61+
# which should be the parent normally.
62+
if isinstance(span, NoOpSpan):
63+
span = None
5964
return dict(
6065
sentry_sdk.get_current_scope().iter_trace_propagation_headers(span=span)
6166
)

0 commit comments

Comments
 (0)