We've shipped automatic code mapping and in-app frame detection for Java stack traces. Using our GitHub integration means Sentry can automatically link stack traces to your source code and figure out which frames belong to your application, improving stack trace readability and grouping quality – all without you needing to configure anything.
Quick Background
Previously, getting accurate stack traces, code links, and good grouping for Java often required manually setting up code mappings (linking Sentry to your repo) and in-app rules (telling Sentry which code is yours vs. a library). This was often skipped because it could be tedious, especially for projects with many packages.
How it works
If you've got the Sentry GitHub integration installed, here’s what happens automatically for your Java errors:
- Sentry looks at stack trace frames, like:
module: at.markushi.expensemanager.view.main.HomeActivity
abs_path: HomeActivity.java
-
It pieces together a potential file path like
at/markushi/expensemanager/view/main/HomeActivity.java -
It searches for that path in your connected GitHub repositories.
-
If it finds a unique match, Sentry automatically creates the code mapping and an in-app rule for that code path. This means future errors from the same code parts will be correctly linked and marked as in-app.
What You Get
- Clearer Stack Traces: Your application code is front-and-center, with system/library frames collapsed by default.
- Direct Code Links: Jump straight from a Sentry stack trace frame to the exact line in your GitHub repo.
- Better Grouping: More accurate identification of in-app frames leads to smarter, more reliable issue grouping.
- Zero Config: You no longer need to manually configure these mappings or rules for Java. So if you’re that one project for which we helped auto-generate 140 configurations, saving you from doing that manually, you’re welcome.
Getting started
- Install the Sentry GitHub integration if you haven't already.
- Enabled automatically: For Java projects with the integration configured, this feature is enabled automatically. No extra configuration is required.
- Automatic code mapping: Sentry automatically creates code mappings when it uniquely matches a stack trace frame to a file in the linked repositories.
Note: If you've already set up manual code mappings, those will still take precedence.
