-init-.md 1.54 KB
Newer Older
1
2
3
4
[android-components](../../index.md) / [mozilla.components.lib.crash.service](../index.md) / [SentryService](index.md) / [<init>](./-init-.md)

# <init>

MickeyMoz's avatar
MickeyMoz committed
5
`SentryService(context: <ERROR CLASS>, dsn: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, tags: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`> = emptyMap(), environment: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`? = null, sendEventForNativeCrashes: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false, sentryProjectUrl: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`? = null, clientFactory: SentryClientFactory? = null)`
6
7
8

A [CrashReporterService](../-crash-reporter-service/index.md) implementation that uploads crash reports to a Sentry server.

MickeyMoz's avatar
MickeyMoz committed
9
10
11
This implementation will add default tags to every sent crash report (like the used Android Components version)
prefixed with "ac.".

12
13
### Parameters

MickeyMoz's avatar
MickeyMoz committed
14
`context` - The application [Context](#).
15
16
17

`dsn` - Data Source Name of the Sentry server.

MickeyMoz's avatar
MickeyMoz committed
18
19
`tags` - A list of additional tags that will be sent together with crash reports.

MickeyMoz's avatar
MickeyMoz committed
20
21
22
`environment` - An optional, environment name string or null to set none

`sentryProjectUrl` - Base URL of the Sentry web interface pointing to the app/project.