Skip to content
Open
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
10 changes: 5 additions & 5 deletions sentry_sdk/tracing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ def maybe_create_breadcrumbs_from_span(scope, span):

def _get_frame_module_abs_path(frame):
# type: (FrameType) -> Optional[str]
try:
return frame.f_code.co_filename
except Exception:
return None
code = getattr(frame, "f_code", None)
return getattr(code, "co_filename", None) if code is not None else None


def _should_be_included(
Expand Down Expand Up @@ -527,7 +525,9 @@ def _fill_sample_rand(self):
)
return

self.dynamic_sampling_context["sample_rand"] = f"{sample_rand:.6f}" # noqa: E231
self.dynamic_sampling_context["sample_rand"] = (
f"{sample_rand:.6f}" # noqa: E231
)

def _sample_rand(self):
# type: () -> Optional[str]
Expand Down