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

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

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

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.

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

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

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

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 mapping from the module in the error (e.g. com.foo.bar) to the file (com/foo/bar.java) representing

This is the same process as [the documented manual step of creating the code mapping](https://docs.sentry.io/platforms/java/source-context/#setting-up-code-mappings).

We already derive code mappings for other languages ([[1](https://blog.sentry.io/code-mappings-and-why-they-matter/)]). The novelty for 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:foo.bar.** +app

For the concerned developer, source code contents are not used; only the file paths.

Task list:

  • Create tech spec, update RFC and communicate #84226
  • Dry-run code mappings for Java & collect metrics
  • Designs for Sentry generated stack-trace rules
  • Dry-run in-app rules & collect metrics
  • Fix any errors from dry-run stage
  • Prepare docs
  • Enable for EA
  • Enable for GA
  • Write blog post
@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
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