Use Sentry Java with Grails 4

Earlier, I was using Sentry’s legacy API 1.7.30 in my Grails 3/4 application via our common code. Today, I upgraded that to v5.0.0 feat: Upgrade sentry-java to 5.0.0 · wizpanda/kernel@1c6fae7 · GitHub.

But because of the upgrade, I had to remove the custom HttpInterface (from v1.7.x) & UserInterface because my Sentry events are no longer having request details.

I looked into the integration of Spring Boot, Spring & Servlet, and the best suitable option seems to be Spring Boot as Grails 4 already uses Spring Boot > 2.1.0.

I read the code of spring-boot, spring & servlet in spring-java, but I couldn’t figure out how should I configure those in my Grails 4 app.

I think it should be related to configuring SentryAutoConfiguration via the Application.groovy class as it is the starter application where we can initialize things.

Any help?

@sagrawal31 thanks for reporting.

I guess the equivalent of the HttpInterface is our Request interface, have a look at sentry-java/ at 97c6a6600295157453cc435ad47f4be07268a58f · getsentry/sentry-java · GitHub

Thanks for the guidance. I was able to achieve this by simply registering the servlet bean kernel/KernelGrailsPlugin.groovy at 43407418dcd373ee94329d762d850c9b6cd1a35c · wizpanda/kernel · GitHub.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.