sentry-java / rules
Cursor rule1.4k starsChanged 7 months agoMITView on GitHub
Module Addition Rules for sentry-java
Trending
Quiet this year.about the whole repository
Who's talking about getsentry/sentry-java
- getsentry/sentry“[Mobile Replay] Capture Network request/response bodies”GitHub · Feb 5, 2025 · 48 reactions
- quarkusio/quarkus“Sentry tracing with automatic instrumentation”GitHub · Aug 31, 2021 · 19 reactions
- getsentry/sentry-dart“Support Source Context”GitHub · Oct 25, 2020 · 18 reactions
- getsentry/sentry-dotnet“OpenTelemetry Support”GitHub · Nov 25, 2022 · 11 reactions
- getsentry/sentry-dotnet“Feature: Session Replay support for .NET MAUI”GitHub · Jan 30, 2023 · 8 reactions
The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 18
Talked about on GitHub (18 times).
On GitHub · 18
- Feb 5, 2025[Mobile Replay] Capture Network request/response bodies — getsentry/sentry48 reactions · 13 comments
- Aug 31, 2021Sentry tracing with automatic instrumentation — quarkusio/quarkus19 reactions · 20 comments
- Oct 25, 2020Support Source Context — getsentry/sentry-dart18 reactions · 24 comments
- Nov 25, 2022OpenTelemetry Support — getsentry/sentry-dotnet11 reactions · 4 comments
- Jan 30, 2023Feature: Session Replay support for .NET MAUI — getsentry/sentry-dotnet8 reactions · 9 comments
13 more on GitHub
- Mar 19, 2025Add UI Profiling Support (converted to project) — getsentry/sentry-react-native5 reactions · 3 comments
- Jan 20, 2021Proposal (Performance): Some convenience API to wrap a Promise with a Span/Transaction — getsentry/sentry-javascript5 reactions · 2 comments
- May 1, 2025feat: Initial Android support — getsentry/sentry-godot4 reactions · 3 comments
- Mar 25, 2024feat(replay): Add Mobile Replay Alpha — getsentry/sentry-react-native4 reactions · 8 comments
- Feb 8, 2023Add support for Sentry — spring-io/start.spring.io4 reactions · 6 comments
- May 4, 2022Figure out how to implement hints — getsentry/sentry-javascript4 reactions · 5 comments
- Dec 10, 2020Add basic support for attachments — getsentry/sentry-cocoa4 reactions
- Jul 17, 2025Bump io.sentry.android.gradle from 4.10.0 to 5.8.0 — woocommerce/woocommerce-android3 reactions · 2 comments
- Jul 23, 2024feat: User Feedback widget/form — getsentry/sentry-cocoa3 reactions · 5 comments
- May 1, 2024Remove `enableTracing` (and update docs accordingly) — getsentry/team-sdks3 reactions · 7 comments
- Feb 1, 2024[Epic] Mobile Session Replay — getsentry/sentry3 reactions · 2 comments
- Nov 20, 2023Tracing: W3C Trace Context Support — getsentry/team-sdks3 reactions · 9 comments
- Jan 12, 2023Allow more granular auto installation — getsentry/sentry-android-gradle-plugin3 reactions · 3 comments
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/api.mdcCursor rule
- .cursor/rules/continuous_profiling_jvm.mdcCursor rule
- .cursor/rules/deduplication.mdcCursor rule
- .cursor/rules/e2e_tests.mdcCursor rule
- .cursor/rules/feature_flags.mdcCursor rule
- .cursor/rules/metrics.mdcCursor rule
- .cursor/rules/offline.mdcCursor rule
- .cursor/rules/opentelemetry.mdcCursor rule
- .cursor/rules/options.mdcCursor rule
- .cursor/rules/queues.mdcCursor rule
- .cursor/rules/scopes.mdcCursor rule
- btrace-perfettoSkill
- check-code-attributionSkill
- create-java-prSkill
- testSkill
The file
Show its rules and text
We split this new_module.mdc into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Create the new module, conforming to the existing naming conventions and build scripts.
- Very specific: line 19
Add the module to the include list in settings.gradle.kts
- Very specific: line 21
If adding a sentry-samples module, also add it to the ignoredProjects list in the root build.gradle.kts:
- Very specific: line 32
Add a SENTRY_{MODULE}_SDK_NAME constant to the Config.Sentry block in buildSrc/src/main/java/Config.kt:
- Very specific: line 42
Add the instrumented library to gradle/libs.versions.toml and depend on it with compileOnly(libs.<lib>), so the integration does not force …
- Very specific: line 57
If adding a JVM sample, add E2E (system) tests, following the structure we have in the existing JVM examples.
- Distinctive: line 64
Create a README.md in the module directory with the following structure:
- Distinctive: line 78
Add the new module to the packages table in the main README.md.
- Very specific: line 90
Add - sentry-{module-name} to the integrations dropdown in .github/ISSUE_TEMPLATE/bug_report_java.yml, or bug_report_android.yml for an …
- Distinctive: line 95
Add the necessary documentation to docs.sentry.io:
- Distinctive: line 104
Add the SDK to the Sentry release registry, following the instructions in the sentry-release-registry README
- Very specific: line 106
Add the module to .craft.yml in the sdks section:
- Very specific: line 115
Use kebab-case for module names: sentry-{module-name}
- Very specific: line 116
Follow existing patterns: sentry-okhttp, sentry-apollo-4, sentry-spring-boot
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Module Addition Rules for sentry-java
alwaysApply: false
---
# Module Addition Rules for sentry-java
## Overview
This document outlines the complete process for adding a new module to the sentry-java repository. Follow these steps in order to ensure proper integration and release management.
## Step-by-Step Process
### 1. Create the Module Structure
1. Create the new module, conforming to the existing naming conventions and build scripts.
Copy the `build.gradle.kts` of the closest existing integration rather than writing one from
scratch — `sentry-kafka` is a good JVM template, `sentry-android-timber` a good Android one.
2. Add the module to the include list in `settings.gradle.kts`
If adding a `sentry-samples` module, also add it to the `ignoredProjects` list in the root `build.gradle.kts`:
```kotlin
ignoredProjects.addAll(
listOf(
// ... existing projects ...
"sentry-samples-{module-name}"
)
)
```
3. Add a `SENTRY_{MODULE}_SDK_NAME` constant to the `Config.Sentry` block in
`buildSrc/src/main/java/Config.kt`:
```kotlin
val SENTRY_FOO_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.foo"
```
The module's `build.gradle.kts` consumes it in both `buildConfig` and the jar manifest
(`Sentry-SDK-Name` / `Sentry-SDK-Package-Name`) — see `sentry-kafka/build.gradle.kts`.
4. Add the instrumented library to `gradle/libs.versions.toml` and depend on it with
`compileOnly(libs.<lib>)`, so the integration does not force the dependency on users.
5. Register the integration with the SDK so it is reported in the `sdk` payload. Every
integration does this — see `sentry-openfeature/.../SentryOpenFeatureHook.java`:
```java
static {
SentryIntegrationPackageStorage.getInstance()
.addPackage("maven:io.sentry:sentry-{module-name}", BuildConfig.VERSION_NAME);
}
// then, from the constructor:
addIntegrationToSdkVersion("{IntegrationName}");
```
6. If adding a JVM sample, add E2E (system) tests, following the structure we have in the existing JVM examples.
The test should then be added to `test/system-test-runner.py` and `.github/workflows/system-tests-backend.yml`.
`sentry-bom` and the root `build.gradle.kts` need no change — they iterate over subprojects.
### 2. Create Module Documentation
Create a `README.md` in the module directory with the following structure:
```markdown
# sentry-{module-name}
This module provides an integration for [Technology/Framework Name].
Please consult the documentation on how to install and use this integration in the Sentry Docs for [Android](https://docs.sentry.io/platforms/android/integrations/{module-name}/) or [Java](https://docs.sentry.io/platforms/java/tracing/instrumentation/{module-name}/).
```
The following tasks are required only when adding a module that isn't a sample.
### 3. Update Main README.md
Add the new module to the packages table in the main `README.md`. Copy the row of a neighbouring
module and swap the name — Android modules carry a third column for the min API level, JVM modules
do not:
```markdown
| sentry-{module-name} | [](https://central.sonatype.com/artifact/io.sentry/sentry-{module-name}) |
```
Note that the badge will only work after the module is released to Maven Central.
### 4. Add the Module to the Issue Template
Add `- sentry-{module-name}` to the integrations dropdown in
`.github/ISSUE_TEMPLATE/bug_report_java.yml`, or `bug_report_android.yml` for an Android module.
### 5. Add Documentation to docs.sentry.io
Add the necessary documentation to [docs.sentry.io](https://docs.sentry.io):
- For Java modules: Add to Java platform docs, usually in integrations section
- For Android modules: Add to Android platform docs, usually in integrations section
- Include installation instructions, configuration options, and usage examples
### 6. Post release tasks
Remind the user to perform the following tasks after the module is merged and released:
1. Add the SDK to the Sentry release registry, following the instructions in the [sentry-release-registry README](https://github.com/getsentry/sentry-release-registry#adding-new-sdks)
2. Add the module to `.craft.yml` in the `sdks` section:
```yaml
sdks:
# ... existing modules ...
maven:io.sentry:sentry-{module-name}:
```
## Module Naming Conventions
- Use kebab-case for module names: `sentry-{module-name}`
- Follow existing patterns: `sentry-okhttp`, `sentry-apollo-4`, `sentry-spring-boot`
- For version-specific modules, include the version: `sentry-apollo-3`, `sentry-apollo-4`
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

