Skip to content

Commit

Permalink
Use in app filepath instead of absolute path (#2541)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Nov 29, 2023
1 parent c025ffe commit 044ce0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sentry_sdk/tracing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def add_query_source(hub, span):
except Exception:
filepath = None
if filepath is not None:
span.set_data(SPANDATA.CODE_FILEPATH, frame.f_code.co_filename)
in_app_path = filepath.replace(project_root, "")
span.set_data(SPANDATA.CODE_FILEPATH, in_app_path)

try:
code_function = frame.f_code.co_name
Expand Down

0 comments on commit 044ce0a

Please sign in to comment.