From 861ca58a58675e5f063072b7f31e8cefeaaeaed5 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 13 Mar 2022 17:41:01 +0530 Subject: Configure Sentry with more information (#1782) * build-logic: remove error path in Sentry plugin * gradle: fix UnstableApiUsage warning * build-logic: configure Sentry Gradle Plugin * app: set traces sample-rate to 1.0 * sentry-stub: init * app: populate Sentry user field with feature flags --- sentry-stub/src/main/kotlin/io/sentry/Scope.kt | 10 ++++++++++ sentry-stub/src/main/kotlin/io/sentry/Sentry.kt | 8 ++++++++ sentry-stub/src/main/kotlin/io/sentry/protocol/User.kt | 12 ++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 sentry-stub/src/main/kotlin/io/sentry/Scope.kt create mode 100644 sentry-stub/src/main/kotlin/io/sentry/Sentry.kt create mode 100644 sentry-stub/src/main/kotlin/io/sentry/protocol/User.kt (limited to 'sentry-stub/src') diff --git a/sentry-stub/src/main/kotlin/io/sentry/Scope.kt b/sentry-stub/src/main/kotlin/io/sentry/Scope.kt new file mode 100644 index 00000000..34557a84 --- /dev/null +++ b/sentry-stub/src/main/kotlin/io/sentry/Scope.kt @@ -0,0 +1,10 @@ +@file:Suppress("Unused", "UNUSED_PARAMETER") + +package io.sentry + +import io.sentry.protocol.User + +public class Scope { + public var user: User? = null + public fun setTag(tag: String, value: String) {} +} diff --git a/sentry-stub/src/main/kotlin/io/sentry/Sentry.kt b/sentry-stub/src/main/kotlin/io/sentry/Sentry.kt new file mode 100644 index 00000000..e64f176e --- /dev/null +++ b/sentry-stub/src/main/kotlin/io/sentry/Sentry.kt @@ -0,0 +1,8 @@ +@file:Suppress("Unused", "UNUSED_PARAMETER") + +package io.sentry + +/** Stubs for the Sentry SDK */ +public object Sentry { + public fun configureScope(callback: (Scope) -> Unit) {} +} diff --git a/sentry-stub/src/main/kotlin/io/sentry/protocol/User.kt b/sentry-stub/src/main/kotlin/io/sentry/protocol/User.kt new file mode 100644 index 00000000..5b60ba72 --- /dev/null +++ b/sentry-stub/src/main/kotlin/io/sentry/protocol/User.kt @@ -0,0 +1,12 @@ +@file:Suppress("Unused", "UNUSED_PARAMETER") + +package io.sentry.protocol + +public data class User( + public var email: String? = null, + public var id: String? = null, + public var username: String? = null, + public var ipAddress: String? = null, + public var others: Map? = null, + public var unknown: Map? = null, +) -- cgit v1.2.3