← All platforms

Java error tracking

There’s a story behind that exception. Keep its backtrace on your server, with the Sentry Java SDK and Telebugs.

~/hoofnotes  nvim build.gradle src/main/java/HoofNotes.java
dependencies {
implementation 'io.sentry:sentry:8.55.0'
}
import io.sentry.Sentry;
public class HoofNotes {
public static void main(String[] args) {
Sentry.init(options -> {
// Copy the complete DSN, key and path included.
options.setDsn("YOUR_TELEBUGS_DSN");
});
try {
throw new IllegalStateException("Hello from Hoof Notes");
} catch (Exception error) {
Sentry.captureException(error);
} finally {
Sentry.close();
}
}
}
~/hoofnotes  ./gradlew run

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep io.sentry:sentry. Point it at your Telebugs DSN and keep reporting errors as before. The reports go to your server; you don’t need a Sentry account.

Can I see what caused the exception?

Yes. Telebugs keeps the exception, its backtrace, and the context the SDK sends with it. You can follow the calls back through your Java code.

Does this work with Spring?

Yes. There are Sentry integrations for Spring and Spring Boot. They connect request error handling to the same Telebugs server.