getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.15k stars 433 forks source link

Add aspectjweaver Dependency for Sentry Cron Monitoring #3522

Open flex-junkyu opened 3 months ago

flex-junkyu commented 3 months ago

Problem Statement

While implementing Sentry for cron job monitoring in a Kotlin/Spring application, I encountered an issue where the advisor was not being registered as a bean, which caused the monitoring to fail silently. This was due to the missing aspectjweaver dependency.

I propose the following solutions to prevent this issue for other users:

  1. Update Documentation: Clearly state in the Sentry documentation that org.aspectj:aspectjweaver needs to be included as a dependency for proper operation of AOP-based features like cron job monitoring.

  2. Module Dependency: Include org.aspectj:aspectjweaver directly within the Sentry module dependencies, ensuring it is automatically available when the Sentry module is used.

Solution Brainstorm

No response

flex-junkyu commented 3 months ago

I prefer the latter. Please review. thank you

adinauer commented 3 months ago

Thanks for the report @flex-junkyu, we'll discuss internally and update here once we've made a decision on how to proceed.