You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/create-java-pr/SKILL.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ Derive the branch name from the changes being made. Use `feat/`, `fix/`, `ref/`,
35
35
36
36
**For stacked PRs:** For the first PR in a new stack, first create and push the collection branch (see `.cursor/rules/pr.mdc` § "Creating the Collection Branch"), then branch the PR off it. For subsequent PRs, branch off the previous stack branch. Use the naming conventions from `.cursor/rules/pr.mdc` § "Branch Naming".
37
37
38
+
**CRITICAL: Never merge, fast-forward, or push commits into the collection branch.** It stays at its initial position until the user merges stack PRs through GitHub. Updating it will auto-merge and destroy the entire PR stack.
39
+
38
40
## Step 2: Format Code and Regenerate API Files
39
41
40
42
```bash
@@ -111,14 +113,15 @@ Fill in each section based on the changes being PR'd. Check any checklist items
111
113
- Pass `--base <previous-stack-branch>` so the PR targets the previous branch (first PR in a stack targets the collection branch).
112
114
- Use the stacked PR title format: `<type>(<scope>): [<Topic> <N>] <Subject>` (see `.cursor/rules/pr.mdc` § "PR Title Naming").
113
115
- Include the stack list at the top of the PR body, before the `## :scroll: Description` section (see `.cursor/rules/pr.mdc` § "Stack List in PR Description" for the format).
116
+
- Add a merge method reminder at the very end of the PR body (see `.cursor/rules/pr.mdc` § "Stack List in PR Description" for the exact text). This only applies to stack PRs, not the collection branch PR.
114
117
115
118
Then continue to Step 5.5 (stacked PRs only) or Step 6.
116
119
117
120
## Step 5.5: Update Stack List on All PRs (stacked PRs only)
118
121
119
122
Skip this step for standalone PRs.
120
123
121
-
After creating the PR, update the PR description on **every other PR in the stack** so all PRs have the same up-to-date stack list. Follow the format and commands in `.cursor/rules/pr.mdc` § "Stack List in PR Description".
124
+
After creating the PR, update the PR description on **every other PR in the stack — including the collection branch PR** — so all PRs have the same up-to-date stack list. Follow the format and commands in `.cursor/rules/pr.mdc` § "Stack List in PR Description".
Copy file name to clipboardExpand all lines: .cursor/rules/pr.mdc
+15-3Lines changed: 15 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,8 @@ git push -u origin HEAD
185
185
gh pr create --base main --draft --title "<type>(<scope>): <Topic>" --body "Collection PR for the <Topic> stack. Squash-merge this once all stack PRs are merged."
186
186
```
187
187
188
+
**CRITICAL: Do NOT manually update the collection branch.** Never merge, fast-forward, or push stack branch commits into the collection branch. The collection branch stays at its initial position (the empty commit on `main`) until the user merges individual stack PRs into it one by one through GitHub. If you fast-forward the collection branch to include stack commits, GitHub will auto-merge and delete all stack PR branches, destroying the entire stack.
189
+
188
190
### Creating a New Stacked PR
189
191
190
192
1. Start from the tip of the previous stack branch (or the collection branch for the first PR).
Every PR in the stack must have a stack list **at the top of its description** (before the `## :scroll: Description` section). When a new PR is added, update the description on **all** PRs in the stack.
202
+
Every PR in the stack — **including the collection branch PR** — must have a stack list **at the top of its description** (before the `## :scroll: Description` section). When a new PR is added, update the description on **all** PRs in the stack and on the collection branch PR.
201
203
202
204
Format:
203
205
@@ -213,6 +215,14 @@ Format:
213
215
214
216
No status column — GitHub already shows that. The `---` separates the stack list from the rest of the PR description.
215
217
218
+
**Merge method reminder:** On stack PRs (not the collection branch PR), add the following line at the very end of the PR description:
219
+
220
+
```markdown
221
+
> ⚠️ **Merge this PR using a merge commit** (not squash). Only the collection branch is squash-merged into main.
222
+
```
223
+
224
+
This does not apply to standalone PRs or the collection branch PR.
225
+
216
226
To update the PR description, use `--body-file` to avoid shell quoting issues with special characters in the body:
217
227
218
228
```bash
@@ -237,12 +247,12 @@ Once all stack PRs are merged into the collection branch, the collection PR is *
237
247
238
248
### Syncing the Stack
239
249
240
-
When a base PR changes (e.g. after addressing review feedback on PR 1), merge the changes forward through the stack:
250
+
When a base PR changes (e.g. after addressing review feedback on PR 1), merge the changes forward through the stack **between adjacent stack PR branches only**:
**Never merge into the collection branch.** Syncing only happens between stack PR branches. The collection branch is untouched until the user merges PRs through GitHub.
265
+
254
266
Prefer merge over rebase — it preserves commit history, doesn't invalidate existing review comments, and avoids the need for force-pushing. Only rebase if explicitly requested.
- The `ManifestMetaDataReader` now read the `DIST` ([#5107](https://github.com/getsentry/sentry-java/pull/5107))
49
+
- Add new experimental option to capture profiles for ANRs ([#4899](https://github.com/getsentry/sentry-java/pull/4899))
50
+
- This feature will capture a stack profile of the main thread when it gets unresponsive
51
+
- The profile gets attached to the ANR event on the next app start, providing a flamegraph of the ANR issue on the sentry issue details page
52
+
- Enable via `options.setAnrProfilingSampleRate(<sample-rate>)` or AndroidManifest.xml: `<meta-data android:name="io.sentry.anr.profiling.sample-rate" android:value="[0.0-1.0]" />`
53
+
- The sample rate controls the probability of collecting a profile for each detected foreground ANR (0.0 to 1.0, null to disable)
54
+
- Add `enableAnrFingerprinting` option to reduce ANR noise by assigning static fingerprints to ANR events with system-only stacktraces
55
+
- When enabled, ANRs whose stacktraces contain only system frames (e.g. `java.lang` or `android.os`) are grouped into a single issue instead of creating many separate issues
56
+
- Enable via `options.setEnableAnrFingerprinting(true)` or AndroidManifest.xml: `<meta-data android:name="io.sentry.anr.enable-fingerprinting" android:value="true" />`
47
57
48
58
### Fixes
49
59
@@ -179,7 +189,7 @@
179
189
- Discard envelopes on `4xx` and `5xx` response ([#4950](https://github.com/getsentry/sentry-java/pull/4950))
180
190
- This aims to not overwhelm Sentry after an outage or load shedding (including HTTP 429) where too many events are sent at once
181
191
182
-
### Feature
192
+
### Features
183
193
184
194
- Add a Tombstone integration that detects native crashes without relying on the NDK integration, but instead using `ApplicationExitInfo.REASON_CRASH_NATIVE` on Android 12+. ([#4933](https://github.com/getsentry/sentry-java/pull/4933))
185
195
- Currently exposed via options as an _internal_ API only.
Copy file name to clipboardExpand all lines: sentry-android-core/api/sentry-android-core.api
+78Lines changed: 78 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -347,6 +347,7 @@ public final class io/sentry/android/core/SentryAndroidDateProvider : io/sentry/
347
347
public final class io/sentry/android/core/SentryAndroidOptions : io/sentry/SentryOptions {
348
348
public fun <init> ()V
349
349
public fun enableAllAutoBreadcrumbs (Z)V
350
+
public fun getAnrProfilingSampleRate ()Ljava/lang/Double;
350
351
public fun getAnrTimeoutIntervalMillis ()J
351
352
public fun getBeforeScreenshotCaptureCallback ()Lio/sentry/android/core/SentryAndroidOptions$BeforeCaptureCallback;
352
353
public fun getBeforeViewHierarchyCaptureCallback ()Lio/sentry/android/core/SentryAndroidOptions$BeforeCaptureCallback;
@@ -357,6 +358,7 @@ public final class io/sentry/android/core/SentryAndroidOptions : io/sentry/Sentr
357
358
public fun getScreenshot ()Lio/sentry/android/core/SentryScreenshotOptions;
358
359
public fun getStartupCrashDurationThresholdMillis ()J
359
360
public fun isAnrEnabled ()Z
361
+
public fun isAnrProfilingEnabled ()Z
360
362
public fun isAnrReportInDebug ()Z
361
363
public fun isAttachAnrThreadDump ()Z
362
364
public fun isAttachScreenshot ()Z
@@ -365,6 +367,7 @@ public final class io/sentry/android/core/SentryAndroidOptions : io/sentry/Sentr
365
367
public fun isCollectExternalStorageContext ()Z
366
368
public fun isEnableActivityLifecycleBreadcrumbs ()Z
367
369
public fun isEnableActivityLifecycleTracingAutoFinish ()Z
370
+
public fun isEnableAnrFingerprinting ()Z
368
371
public fun isEnableAppComponentBreadcrumbs ()Z
369
372
public fun isEnableAppLifecycleBreadcrumbs ()Z
370
373
public fun isEnableAutoActivityLifecycleTracing ()Z
@@ -381,6 +384,7 @@ public final class io/sentry/android/core/SentryAndroidOptions : io/sentry/Sentr
381
384
public fun isReportHistoricalTombstones ()Z
382
385
public fun isTombstoneEnabled ()Z
383
386
public fun setAnrEnabled (Z)V
387
+
public fun setAnrProfilingSampleRate (Ljava/lang/Double;)V
384
388
public fun setAnrReportInDebug (Z)V
385
389
public fun setAnrTimeoutIntervalMillis (J)V
386
390
public fun setAttachAnrThreadDump (Z)V
@@ -393,6 +397,7 @@ public final class io/sentry/android/core/SentryAndroidOptions : io/sentry/Sentr
393
397
public fun setDebugImagesLoader (Lio/sentry/android/core/IDebugImagesLoader;)V
394
398
public fun setEnableActivityLifecycleBreadcrumbs (Z)V
395
399
public fun setEnableActivityLifecycleTracingAutoFinish (Z)V
400
+
public fun setEnableAnrFingerprinting (Z)V
396
401
public fun setEnableAppComponentBreadcrumbs (Z)V
397
402
public fun setEnableAppLifecycleBreadcrumbs (Z)V
398
403
public fun setEnableAutoActivityLifecycleTracing (Z)V
@@ -553,6 +558,79 @@ public final class io/sentry/android/core/ViewHierarchyEventProcessor : io/sentr
553
558
public static fun snapshotViewHierarchyAsData (Landroid/app/Activity;Lio/sentry/util/thread/IThreadChecker;Lio/sentry/ISerializer;Lio/sentry/ILogger;)[B
554
559
}
555
560
561
+
public class io/sentry/android/core/anr/AggregatedStackTrace {
562
+
public fun <init> ([Ljava/lang/StackTraceElement;IIJF)V
563
+
public fun addOccurrence (J)V
564
+
public fun getStack ()[Ljava/lang/StackTraceElement;
565
+
}
566
+
567
+
public class io/sentry/android/core/anr/AnrCulpritIdentifier {
568
+
public fun <init> ()V
569
+
public static fun identify (Ljava/util/List;)Lio/sentry/android/core/anr/AggregatedStackTrace;
570
+
public static fun isSystemFrame (Ljava/lang/String;)Z
571
+
}
572
+
573
+
public class io/sentry/android/core/anr/AnrProfile {
574
+
public final field endTimeMs J
575
+
public final field stacks Ljava/util/List;
576
+
public final field startTimeMs J
577
+
public fun <init> (Ljava/util/List;)V
578
+
}
579
+
580
+
public class io/sentry/android/core/anr/AnrProfileManager : java/lang/AutoCloseable {
581
+
public fun <init> (Lio/sentry/SentryOptions;)V
582
+
public fun <init> (Lio/sentry/SentryOptions;Ljava/io/File;)V
583
+
public fun add (Lio/sentry/android/core/anr/AnrStackTrace;)V
584
+
public fun clear ()V
585
+
public fun close ()V
586
+
public fun load ()Lio/sentry/android/core/anr/AnrProfile;
587
+
}
588
+
589
+
public class io/sentry/android/core/anr/AnrProfileRotationHelper {
590
+
public fun <init> ()V
591
+
public static fun deleteLastFile (Ljava/io/File;)Z
592
+
public static fun getFileForRecording (Ljava/io/File;)Ljava/io/File;
593
+
public static fun getLastFile (Ljava/io/File;)Ljava/io/File;
594
+
public static fun rotate ()V
595
+
}
596
+
597
+
public class io/sentry/android/core/anr/AnrProfilingIntegration : io/sentry/Integration, io/sentry/android/core/AppState$AppStateListener, java/io/Closeable, java/lang/Runnable {
598
+
public static final field POLLING_INTERVAL_MS J
599
+
public static final field THRESHOLD_ANR_MS J
600
+
public fun <init> ()V
601
+
protected fun checkMainThread (Ljava/lang/Thread;)V
602
+
public fun close ()V
603
+
protected fun getProfileManager ()Lio/sentry/android/core/anr/AnrProfileManager;
604
+
protected fun getState ()Lio/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState;
605
+
public fun onBackground ()V
606
+
public fun onForeground ()V
607
+
public fun register (Lio/sentry/IScopes;Lio/sentry/SentryOptions;)V
608
+
public fun run ()V
609
+
}
610
+
611
+
protected final class io/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState : java/lang/Enum {
612
+
public static final field ANR_DETECTED Lio/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState;
613
+
public static final field IDLE Lio/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState;
614
+
public static final field SUSPICIOUS Lio/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState;
615
+
public static fun valueOf (Ljava/lang/String;)Lio/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState;
616
+
public static fun values ()[Lio/sentry/android/core/anr/AnrProfilingIntegration$MainThreadState;
617
+
}
618
+
619
+
public final class io/sentry/android/core/anr/AnrStackTrace : java/lang/Comparable {
620
+
public final field stack [Ljava/lang/StackTraceElement;
621
+
public final field timestampMs J
622
+
public fun <init> (J[Ljava/lang/StackTraceElement;)V
623
+
public fun compareTo (Lio/sentry/android/core/anr/AnrStackTrace;)I
624
+
public synthetic fun compareTo (Ljava/lang/Object;)I
625
+
public static fun deserialize (Ljava/io/DataInputStream;)Lio/sentry/android/core/anr/AnrStackTrace;
626
+
public fun serialize (Ljava/io/DataOutputStream;)V
627
+
}
628
+
629
+
public final class io/sentry/android/core/anr/StackTraceConverter {
630
+
public fun <init> ()V
631
+
public static fun convert (Lio/sentry/android/core/anr/AnrProfile;)Lio/sentry/protocol/profiling/SentryProfile;
632
+
}
633
+
556
634
public final class io/sentry/android/core/cache/AndroidEnvelopeCache : io/sentry/cache/EnvelopeCache {
557
635
public static final field LAST_ANR_MARKER_LABEL Ljava/lang/String;
558
636
public static final field LAST_ANR_REPORT Ljava/lang/String;
0 commit comments