0

I'm configuring Sentry to use with our projects but have some issue with it. I would like to put some placeholders in configuration file like

extra=prj:${project.name}

Where project.name is a JVM option set like this:

java -Dproject.name pname -jar my.jar

Is there a way to access it?

St.Antario
  • 26,175
  • 41
  • 130
  • 318

1 Answers1

1

All of the Sentry Java SDK options can be provided as Java System Properties or System Environment Variables already. If you want to use either of those I would just skip using the sentry.properties file altogether: https://docs.sentry.io/clients/java/config/#configuration-via-the-runtime-environment

For example:

java -Dsentry.extra=prj:pname -jar my.jar

All you need to do is prefix the option name with sentry. when you provide the property on the commandline.

Brett
  • 798
  • 1
  • 4
  • 11