sentry on selfhosted

92 views
Skip to first unread message

daniel.n...@gmail.com

unread,
May 4, 2022, 7:58:47 AM5/4/22
to Kill Bill users mailing-list
You have a guide to set up sentry here
https://docs.killbill.io/latest/errors-sentry.html

Is this only possible when using the AMI?
Can you do when running killbill via the docker containers?

Which SDK should you chosse when setting up the project in sentry? Java?

Thanks
/Daniel

j...@jdmooney.us

unread,
May 4, 2022, 8:56:34 AM5/4/22
to daniel.n...@gmail.com, Kill Bill users mailing-list
Daniel,

Hi, I am the author of the AWS Sentry guide. This guide is limited to
AWS implementations right now because the newest Kill Bill AMIs are
preconfigured to send their logs to Sentry once a valid authorization
key (Data Source Name) is installed. It is possible to integrate other
versions with Sentry but there would be more setup required.

Yes, the appropriate platform selection on Sentry would be Java.

Jim Mooney
> --
> 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/bcf7480c-6fd3-4455-92b1-1a585f3dd8c4n%40googlegroups.com
> [1].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/killbilling-users/bcf7480c-6fd3-4455-92b1-1a585f3dd8c4n%40googlegroups.com?utm_medium=email&utm_source=footer

daniel.n...@gmail.com

unread,
May 4, 2022, 9:14:46 AM5/4/22
to Kill Bill users mailing-list
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

Pierre-Alexandre Meyer

unread,
May 5, 2022, 9:29:13 AM5/5/22
to daniel.n...@gmail.com, Kill Bill users mailing-list
Hi Daniel,

The build scripts for the AMIs aren't public. I would recommend following the Sentry docs for Java: https://docs.sentry.io/platforms/java/

Hope this helps!

On Wed, May 4, 2022 at 2:14 PM daniel.n...@gmail.com <daniel.n...@gmail.com> wrote:
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

--
Pierre

daniel nielsen

unread,
May 5, 2022, 1:16:33 PM5/5/22
to Pierre-Alexandre Meyer, Kill Bill users mailing-list
Thanks Pierre-Alexandre

I’ll try it out

/Daniel

Matthew Baker

unread,
May 20, 2022, 2:48:30 AM5/20/22
to Kill Bill users mailing-list
Hi there,

Does this imply that the version of KillBill bundled into the AWS AMI is a custom build of the app to include the Sentry agent software? And if so I guess in order to use Sentry one would have to compile KillBill from source in order to make use of Sentry?

Cheers,
matb

Pierre-Alexandre Meyer

unread,
May 20, 2022, 9:12:05 AM5/20/22
to Matthew Baker, Kill Bill users mailing-list
Hi matb,

Yes, the AWS AMI bundles a premium version of Kill Bill, with features and optimizations that aren't open-source.

To use Sentry with the open-source build, I suspect simply using the vanilla Sentry Java agent would work (no need to recompile Kill Bill).

Hope this helps,

--
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.

Christopher Schmitt

unread,
Jul 21, 2025, 6:06:28 AMJul 21
to Kill Bill users mailing-list

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


1. Add Sentry Libraries to Classpath

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!





PACE Telematics GmbH
Haid-und-Neu-Str. 18
76131 Karlsruhe
Germany

Fon: +49 721 276664-0 

Managing Directors: Philip Blatter, Robin Schönbeck
Commercial Register: Mannheim, HRB 722293

https://www.connectedfueling.com


This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.




Pierre-Alexandre Meyer

unread,
Jul 22, 2025, 2:29:35 PMJul 22
to Christopher Schmitt, Kill Bill users mailing-list
Thanks for sharing these details, Christopher!

--
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.


--
Pierre
Reply all
Reply to author
Forward
0 new messages