Skip to content

Commit 28652e0

Browse files
committed
looks like we need to add a TombstoneEventProcessor anyway.
1 parent 936a2f0 commit 28652e0

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

sentry-android-core/api/sentry-android-core.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,10 @@ public final class io/sentry/android/core/SystemEventsBreadcrumbsIntegration : i
457457
public fun register (Lio/sentry/IScopes;Lio/sentry/SentryOptions;)V
458458
}
459459

460+
public class io/sentry/android/core/TombstoneEventProcessor : io/sentry/BackfillingEventProcessor {
461+
public fun <init> (Landroid/content/Context;Lio/sentry/android/core/SentryAndroidOptions;Lio/sentry/android/core/BuildInfoProvider;)V
462+
}
463+
460464
public class io/sentry/android/core/TombstoneIntegration : io/sentry/Integration, java/io/Closeable {
461465
public fun <init> (Landroid/content/Context;)V
462466
public fun close ()V
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package io.sentry.android.core;
2+
3+
import android.content.Context;
4+
import androidx.annotation.WorkerThread;
5+
import io.sentry.BackfillingEventProcessor;
6+
import org.jetbrains.annotations.ApiStatus;
7+
import org.jetbrains.annotations.NotNull;
8+
9+
/** originating from the Native SDK. */
10+
@ApiStatus.Internal
11+
@WorkerThread
12+
public class TombstoneEventProcessor implements BackfillingEventProcessor {
13+
14+
@NotNull private final Context context;
15+
@NotNull private final SentryAndroidOptions options;
16+
@NotNull private final BuildInfoProvider buildInfoProvider;
17+
18+
public TombstoneEventProcessor(
19+
@NotNull Context context,
20+
@NotNull SentryAndroidOptions options,
21+
@NotNull BuildInfoProvider buildInfoProvider) {
22+
this.context = context;
23+
this.options = options;
24+
this.buildInfoProvider = buildInfoProvider;
25+
}
26+
}

sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@ private static Mechanism createMechanismFromSignalInfo(TombstoneProtos.Signal si
134134
// this follows the current processing triggers strictly, changing any of these
135135
// alters grouping and name (long-term we might want to have a tombstone mechanism)
136136
// TODO: if we align this with ANRv2 this would be overwritten in a BackfillingEventProcessor as
137-
// `ApplicationExitInfo` not sure what the right call is. `ApplicationExitInfo` is certainly correct. But `signalhandler` isn't
138-
// wrong either, since all native crashes retrieved via `REASON_CRASH_NATIVE` will be signals. I am not sure what the side-effect
139-
// in ingestion/processing will be if we change the mechanism, but initially i wanted to stay close to the Native SDK.
137+
// `ApplicationExitInfo` not sure what the right call is. `ApplicationExitInfo` is
138+
// certainly correct. But `signalhandler` isn't wrong either, since all native crashes
139+
// retrieved via `REASON_CRASH_NATIVE` will be signals. I am not sure what the side-effect
140+
// in ingestion/processing will be if we change the mechanism, but initially i wanted to
141+
// stay close to the Native SDK.
140142
mechanism.setType("signalhandler");
141143
mechanism.setHandled(false);
142144
mechanism.setSynthetic(true);

0 commit comments

Comments
 (0)