Skip to content
Prompt

sentry-java — Cursor Rules

by getsentry

AI Summary

Public API is tracked via files generated by the Binary Compatibility Validator Gradle plugin. Each module has its own file at . ( module) is the static entry point. Most public API methods on delegate to . When adding a new method to , it typically calls through to . is the base configuration cla

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "sentry-java — Cursor Rules" prompt rules to my project.
Repository: https://github.com/getsentry/sentry-java

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Public API surface, binary compatibility, and common classes to modify

API Compatibility

Public API is tracked via .api files generated by the Binary Compatibility Validator Gradle plugin. Each module has its own file at <module>/api/<module>.api. • Never edit .api files manually. Run ./gradlew apiDump to regenerate them. • ./gradlew check validates current code against .api files and fails on unintended changes. • @ApiStatus.Internal marks classes/methods as internal — they still appear in .api files but are not part of the public contract. • @ApiStatus.Experimental marks API that may change in future versions.

Entry Point

Sentry (sentry module) is the static entry point. Most public API methods on Sentry delegate to getCurrentScopes(). When adding a new method to Sentry, it typically calls through to IScopes.

Interfaces

| Interface | Description | |-----------|-------------| | IScope | Single scope — holds data (tags, extras, breadcrumbs, attributes, user, contexts, etc.) | | IScopes | Multi-scope container — manages global, isolation, and current scope; delegates capture calls to SentryClient | | ISpan | Performance span — timing, tags, data, measurements | | ITransaction | Top-level transaction — extends ISpan |

Configuration

SentryOptions is the base configuration class. Platform-specific subclasses: • SentryAndroidOptions — Android-specific options • Integration modules may add their own (e.g. SentrySpringProperties) New features must be opt-in by default — add a getter/setter pair to the appropriate options class.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted Today
Active
Adoption1K+ stars on GitHub
1.3k ★ · Popular
DocsMissing or thin
Undocumented

GitHub Signals

Stars1.3k
Forks471
Issues273
UpdatedToday
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more