mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 07:28:28 +02:00
Measure performance in Sentry
This commit is contained in:
@@ -34,6 +34,7 @@ struct SentryMonitoringClient {
|
||||
options.dsn = Self.sentryDSN
|
||||
|
||||
// Collecting only 10% of all events
|
||||
options.sampleRate = 0.1
|
||||
options.tracesSampleRate = 0.1
|
||||
|
||||
options.beforeSend = { event in
|
||||
@@ -66,4 +67,11 @@ struct SentryMonitoringClient {
|
||||
event.extra = details
|
||||
SentrySDK.capture(event: event)
|
||||
}
|
||||
|
||||
func startPerformanceTracking(name: String, operation: String) -> StopDurationTracking {
|
||||
let transaction = SentrySDK.startTransaction(name: name, operation: operation)
|
||||
return {
|
||||
transaction.finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user