Skip to content

Support for Source Context #646

@bruno-garcia

Description

@bruno-garcia

There are different approaches we can take to add support for source context:

  1. It's possible to embed sources in the pdb. Couldn't find docs but general GitHub issues. Seems the property is <Embed>true</Embed>.
    With this approach we can document this on docs.sentry.io and suggest users opt-in. And read the source when capturing the SDK (opt-in at first, with the goal of making it opt-out). With the source embedded, we can read it at runtime (see this commit: 518ab64) and send it with the event.

  2. Additional approach is to use Source Bundles and corresponding docs. This requires changes on Sentry CLI and the backend.

  3. Yet another way is to support sourcelink on the server by fetching the external VCS repository to get the relevant line numbers. Related: When sourcelink data is available send with event #400 It also requires changes on the backend but can help us show source context for external, .NET libraries which commonly use sourcelink (.NET itself uses it).

Related:

getsentry/sentry-dart#132

getsentry/sentry-java#633

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request
    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