Application monitoring

Find here all you need to know about application monitoring and Sentry + Napier use.

On debug Sentry is not initialized.

On release Sentry is initialized in AppInitializer#initialize function.

Initialization

The initialize function is based on SENTRY_DSN which is created via BuildKonfig. The secret DSN is retrived from the local.properties file in build.gradle.

Learn more about secrets and BuildKonfig here.

All you need to do is write the DSN of your app in local.properties file. You can get this on your Sentry dashboard when you create your project:

# Sentry
sentry_dsn=

Error logging

On release we use SentryAntilog instead of DebugAntilog and this enables the project to captureException when log level is ERROR.

You can find this code on NapierLogger.kt file.

Last updated