Open adinauer opened 1 year ago
Relates to https://github.com/getsentry/sentry-java/issues/801 but that's Android specific
Should take care not to add too much overhead to the application (i.e. not make it slow).
We already had an agent at some point (https://github.com/getsentry/sentry-java/tree/agent-latest/agent). Here's some feedback for it: https://github.com/getsentry/sentry-java/issues/617
Shouldn't this be closed in favour of sentry-opentelemetry-agent?
@ivan-klass the idea was to make use of the Java Agents bytecode manipulation to add error instrumentation. This can help in cases where libraries are hard to support due to lack of callbacks etc.
It's just an idea we might follow up on at some point.
Problem Statement
We rely on other libraries to offer some callbacks or require users to manipulate / wrap libraries for errors to be reported to Sentry. By using a Java Agent we could wrap calls and capture errors where there's no clean API to usually do so. We already do something similar for Android using sentry-android-gradle-plugin.
Solution Brainstorm
A Sentry Java Agent similar to the OTEL agent. Maybe we can combine them so we don't have to figure out how to make them co-exist. Or we could offer a separate agent just for errors which uses common code that we can also leverage in the Sentry OTEL Java Agent.