Distinguish between indexable and non-indexable extra data

This commit is contained in:
Jorge Martín 2025-12-16 17:45:56 +01:00 committed by Jorge Martin Espinosa
parent 5c6fee08fd
commit 7fe3b18699
10 changed files with 69 additions and 11 deletions

View file

@ -113,10 +113,14 @@ class SentryAnalyticsProvider(
override fun updateSuperProperties(updatedProperties: SuperProperties) {
}
override fun addUserData(key: String, value: String) {
override fun addExtraData(key: String, value: String) {
Sentry.setExtra(key, value)
}
override fun addIndexableData(key: String, value: String) {
Sentry.setTag(key, value)
}
override fun trackError(throwable: Throwable) {
Sentry.captureException(throwable)
}

View file

@ -20,7 +20,9 @@ class SentryAnalyticsTransaction private constructor(span: ISpan) : AnalyticsTra
override fun startChild(operation: String, description: String?): AnalyticsTransaction = SentryAnalyticsTransaction(
inner.startChild(operation, description)
)
override fun setData(key: String, value: Any) = inner.setData(key, value)
override fun putIndexableData(key: String, value: String) = inner.setTag(key, value)
override fun putExtraData(key: String, value: String) = inner.setData(key, value)
override fun traceId(): String? = inner.toSentryTrace().value
override fun isFinished(): Boolean = inner.isFinished
override fun attachError(throwable: Throwable) {