sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Add aspectjweaver Dependency for Sentry Cron Monitoring

Open flex-junkyu opened this issue 1 year ago • 2 comments

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 avatar Jun 26 '24 08:06 flex-junkyu

I prefer the latter. Please review. thank you

flex-junkyu avatar Jun 26 '24 09:06 flex-junkyu

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

adinauer avatar Jun 26 '24 13:06 adinauer

Thanks for reporting this, we have decided to document it, as:

  • aspectjweaver could be incompatible with certain environments (e.g. GraalVM)
  • this is only needed for Crons, so adding it as a dependency would include it for everyone unnecessarily

lcian avatar Mar 12 '25 14:03 lcian