Setting up Sentry
A basic guide to setting up Sentry integration with DivineMC.
Setting up Sentry Integration
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/#######
Configuration Steps
-
Open DivineMC config file
Opendivinemc.ymlfile located in the root of your server directory. -
Find the Sentry Section
Locate thesentry:block, which by default looks like:sentry: # The DSN for Sentry, a service that provides real-time crash reporting that helps you monitor and fix crashes in real time. Leave blank to disable. Obtain link at https://sentry.io dsn: '' # Logs with a level higher than or equal to this level will be recorded. log-level: WARN # Only log Throwable exceptions to Sentry. only-log-thrown: true -
Configure the Settings
dsn: Replace the empty quotes with your DSN, e.g.dsn: 'https://xxxxxxxxxxxxxxxxxxxxxxxx@o######.ingest.sentry.io/#######'log-level: Choose severity threshold (ERROR,WARN,INFO,DEBUG). Default isWARN.only-log-thrown:true: Only send logs with a JavaThrowable(recommended).false: Send any log at or above the threshold.
Save & Restart
Finally, save the divinemc.yml file and restart your server. Sentry should now be integrated and ready to capture errors and logs based on your configuration.
Troubleshooting Tips
-
Errors not appearing?
- Confirm DSN is correct and in quotes.
- Ensure firewall allows outbound to
ingest.sentry.io:443.
-
Too much noise?
- Raise
log-leveltoERROR. - Ensure
only-log-thrownremainstrue.
- Raise
Edit on GitHub
Last updated on