Setting up Sentry
A basic guide to setting up Sentry integration with DivineMC.
#Setting up Sentry Integration
1
Prerequisites
- Sentry Account: You need an account on sentry.io. They offer free tiers suitable for many servers.
- Sentry Project: Create a new project within your Sentry organization. When asked for the platform, choose Java. If Java isn't immediately visible, select "Other" or search for it.
- DSN (Data Source Name): Once your project is created, navigate to its settings. Under Client Keys (DSN) copy the DSN string, which looks like:
https://xxxxxxxxxxxxxxxxxxxxxxxx@o######.ingest.sentry.io/#######
2
Configuration
Open divinemc.yml in the root of your server directory and locate the sentry: block:
sentry:
dsn: ''
log-level: WARN
only-log-thrown: true
Configure the settings:
dsn: Replace the empty quotes with your DSN string.log-level: Choose severity threshold —ERROR,WARN,INFO, orDEBUG. Default isWARN.only-log-thrown: Set totrueto only send logs with a JavaThrowable(recommended). Set tofalseto send any log at or above the threshold.
3
Save & Restart
Save divinemc.yml and restart your server. Sentry is now integrated and will capture errors and logs based on your configuration.
#Troubleshooting
- Errors not appearing? Confirm the DSN is correct and in quotes. Ensure your firewall allows outbound connections to
ingest.sentry.io:443. - Too much noise? Raise
log-leveltoERRORand ensureonly-log-thrownistrue.