Skip to content
Merged
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: 1 addition & 1 deletion sentry_sdk/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ def trace_propagation_meta(self, span=None):
Return meta tags which should be injected into HTML templates
to allow propagation of trace information.
"""
if span is None:
if span is not None:
logger.warning(
"The parameter `span` in trace_propagation_meta() is deprecated and will be removed in the future."
)
Expand Down
9 changes: 6 additions & 3 deletions sentry_sdk/scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,13 @@ def get_baggage(self):
if self._propagation_context is None:
return None

if self._propagation_context.get("dynamic_sampling_context") is None:
dynamic_sampling_context = self._propagation_context.get(
"dynamic_sampling_context"
)
if dynamic_sampling_context is None:
return Baggage.from_options(self)

return None
else:
return Baggage(dynamic_sampling_context)

def get_trace_context(self):
# type: () -> Any
Expand Down