Hi Jim
Thank you for your reply.
Is it possible for me to poke around and add the configuration?Is the building of the AMI on an open git repo so i can see the changes made?
/Daniel
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/bf07fb61-0187-4fcc-b25d-e8753d839c20n%40googlegroups.com.
Hi! Even though this is an old thread, there’s still no ready-to-use solution posted anywhere, so I wanted to share one:
We’re running our Kill Bill instance in a custom Docker image based on the official Kill Bill image. I’d like to share a reliable method using the Logback Appender for integrating with Sentry.
Unfortunately, the previously mentioned Sentry Java agent solution suggested by Pier-Alexandre didn’t work for us — possibly because it was replaced by the OpenTelemetry agent (though I’m not entirely sure). So, we switched to using the Logback appender instead.
Here’s a quick summary of the solution:
Disclaimer: I can’t guarantee this will work for everyone, but it’s working reliably in our setup. If the way we use it is somekind of anti pattern in the JVM world, I don't really care xD
You need to add two essential Sentry libraries to the Kill Bill web application's classpath. The correct location is the WEB-INF/lib directory of the deployed application. In a standard Kill Bill deployment, this path is:
/var/lib/tomcat/webapps/ROOT/WEB-INF/lib/
The two required JARs are:
sentry-logback.jar (the Logback integration)
sentry.jar (the core Sentry SDK)
You can download these from Maven Centra or github. Ensure you use the same version for both.
2. Modify logback.xml
You need to edit the logback.xml file, which is located in the application's classes directory:
/var/lib/tomcat/webapps/ROOT/WEB-INF/classes/logback.xml
Make the following two changes to the file:
First, define the Sentry Appender alongside the other <appender> blocks. It's configured to read its settings from environment variables.
<appender name="SENTRY" class="io.sentry.logback.SentryAppender"> <dsn>${SENTRY_DSN}</dsn> <environment>${SENTRY_ENVIRONMENT:-production}</environment> <release>${KILLBILL_VERSION:-unknown}</release> <minimumEventLevel>WARN</minimumEventLevel> </appender>
Second, activate the appender by adding a reference to it in the <root> logger at the end of the file.
<root level="INFO">
<appender-ref ref="MAIN" />
<appender-ref ref="STDOUT" />
<appender-ref ref="SENTRY" />
</root>
3. Configure at Runtime
When you start your Kill Bill instance, ensure the Java process has access to the following environment variables:
SENTRY_DSN
SENTRY_ENVIRONMENT
KILLBILL_VERSION (for release tracking)
With this configuration, any WARN or ERROR level logs from Kill Bill will be captured and sent to your Sentry project.
Hope this helps others facing the same challenge!
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/killbilling-users/4fd59539-ce6a-4ac0-a175-5cacde52d622n%40googlegroups.com.