Skip to content

Span code.filepath property has the absolute path, rather than the in-app path #2540

Description

@gggritso

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.37.0

Steps to Reproduce

  1. Enable the enable_db_query_source SDK option
  2. Instrument a path that has a query > 100ms
  3. Examine the span that comes into Sentry

Expected Result

The code.filepath property is an in-app path, something like /app/controllers/view.py

The span's code.filepath contains the full absolute path to the file. This is different from Laravel, which attaches the in-app path. Is it possible for the Python SDK to put the app path into code.filepath?

Actual Result

The code.filepath property is an absolute path, something like /usr/george/server/app/controllers/view.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions