feat(snapshots): Add @SentrySnapshot runtime annotation (EME-1055)#1154
Open
runningcode wants to merge 1 commit intomainfrom
Open
feat(snapshots): Add @SentrySnapshot runtime annotation (EME-1055)#1154runningcode wants to merge 1 commit intomainfrom
runningcode wants to merge 1 commit intomainfrom
Conversation
Introduce a new Maven artifact io.sentry:sentry-snapshots-runtime that publishes the @SentrySnapshot annotation. Consumers apply it alongside @Preview to override the global diff threshold on a per-snapshot basis. The diffThreshold parameter name aligns with the --diff-threshold flag in sentry-cli and the diff_threshold field in the snapshot manifest, giving consistent naming across CLI, manifest, and the Android runtime. A follow-up will wire the Gradle plugin's preview scanner to read the annotation and surface the value in per-snapshot sidecar metadata. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
🤖 This preview updates automatically when you update the PR. |
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- Add @SentrySnapshot runtime annotation (EME-1055) ([#1154](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1154))If none of the above apply, you can opt out of this check by adding |
runningcode
commented
Apr 17, 2026
| @@ -0,0 +1,58 @@ | |||
| plugins { | |||
Contributor
Author
There was a problem hiding this comment.
copied from the sentry-kotlin-compiler-plugin but simplified a bit
runningcode
commented
Apr 17, 2026
| @@ -0,0 +1,24 @@ | |||
| org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:+CrashOnOutOfMemoryError | |||
Contributor
Author
There was a problem hiding this comment.
again, copied from the sentry-kotlin-compiler-plugin
rbro112
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
io.sentry:sentry-snapshots-runtimepublishing the@SentrySnapshotannotation. Consumers apply it alongside@Previewto set a per-snapshotdiffThreshold.sentry-snapshots-runtime/, parallel tosentry-kotlin-compiler-plugin, and registered in.craft.yml.PreviewMethodScanner) to read it and surfacediffThresholdin the sidecar JSON written byGenerateSnapshotTestsTask.Resolves part 1 of EME-1055.
🤖 Generated with Claude Code