Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[epic] Automatic code mappings & in-app frames for Java projects #79888

Open
12 tasks
armenzg opened this issue Oct 29, 2024 · 0 comments
Open
12 tasks

[epic] Automatic code mappings & in-app frames for Java projects #79888

armenzg opened this issue Oct 29, 2024 · 0 comments
Assignees

Comments

@armenzg
Copy link
Member

armenzg commented Oct 29, 2024

The Java SDK cannot determine in-app frames for customer issues. In some cases, it does create it based on the app package identifier.

NOTE: Some Java SDKs do mark in-app frames: Spring Boot and Android.

NOTE: At the moment, this system will only work for customers using the GitHub integration. Other SCMs will need to invest in implementing the get trees repo functionality.

DISCLAIMER: For the privacy-conscious developer, source code contents are not used; only the file paths.

Relying on customers setting up their in-app frames with Stack Trace Rules is not successful.

Without in-app frames, the following Sentry features cannot work:

  • Stack trace linking
  • Code coverage linking (if applicable)
  • GitHub pull request comments
  • Suspect Commits
  • Auto-assignments

Only a small number of Java stack traces have in-app frames, thus, the Sentry experience is handicapped.

The idea is that we create a code mapping and a stack trace rule to map from the module or package in the error (e.g. com.foo.bar) to the file (com/foo/bar.java) representing the file in their repositories.

Automatically generating code mappings is based on the documented manual step of creating code mappings by developers.

We already derive code mappings for other languages (1). The novelty of this project is that we will also create the stack trace rules.

Once we derive the code mapping we can add this stack trace rule for the project:

/* Sentry added this stack trace rule to have in-app frames */
stack.[module|package]:foo.bar.** +app

Task list:

@armenzg armenzg self-assigned this Oct 29, 2024
@armenzg armenzg changed the title Support Java Derive code mappings & in-app frames for Java projects Oct 29, 2024
@linear linear bot added the Migrated label Jan 9, 2025
@armenzg armenzg changed the title Derive code mappings & in-app frames for Java projects Automatic code mappings & in-app frames for Java projects Jan 28, 2025
@armenzg armenzg removed the Migrated label Jan 29, 2025
@armenzg armenzg changed the title Automatic code mappings & in-app frames for Java projects [epic] Automatic code mappings & in-app frames for Java projects Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant