diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2022-03-13 17:41:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-13 12:11:01 +0000 |
commit | 861ca58a58675e5f063072b7f31e8cefeaaeaed5 (patch) | |
tree | 1f886ec49d4742be01747d8590aa7d3edd4a7499 /sentry-stub | |
parent | 20725219bdc482480ad7130cd2b3829ae24384a8 (diff) |
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
Diffstat (limited to 'sentry-stub')
-rw-r--r-- | sentry-stub/build.gradle.kts | 4 | ||||
-rw-r--r-- | sentry-stub/src/main/kotlin/io/sentry/Scope.kt | 10 | ||||
-rw-r--r-- | sentry-stub/src/main/kotlin/io/sentry/Sentry.kt | 8 | ||||
-rw-r--r-- | sentry-stub/src/main/kotlin/io/sentry/protocol/User.kt | 12 |
4 files changed, 34 insertions, 0 deletions
diff --git a/sentry-stub/build.gradle.kts b/sentry-stub/build.gradle.kts new file mode 100644 index 00000000..f91458dd --- /dev/null +++ b/sentry-stub/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + kotlin("jvm") + id("com.github.android-password-store.kotlin-library") +} 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<String?, String>? = null, + public var unknown: Map<String?, String>? = null, +) |