Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cursor/rules/coding.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ sentry-java is the Java and Android SDK for Sentry. This repository contains the
./gradlew check

# Run unit tests for a specific file
./gradle ':<module>:testDebugUnitTest' --tests="*<file name>*" --info
./gradlew ':<module>:testDebugUnitTest' --tests="*<file name>*" --info
```

## Contributing Guidelines

1. Follow existing code style and language
2. Do not modify the API files (e.g. sentry.api) manually, instead run `./gradlew apiDump` to regenerate them
2. Do not modify the API files (e.g. sentry.api) manually, instead run `./gradlew apiDump` to regenerate them
3. Write comprehensive tests
4. New features should always be opt-in by default, extend `SentryOptions` or similar Option classes with getters and setters to enable/disable a new feature
5. Consider backwards compatibility
Expand Down
2 changes: 2 additions & 0 deletions .cursor/rules/pr.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Entry format:
- <Short description> ([#<PR_NUMBER>](https://github.com/getsentry/sentry-java/pull/<PR_NUMBER>))
```

**When rebasing:** A rebase onto `main` can land your branch after a release was cut, where the `## Unreleased` heading your entry lived under has since been renamed to that version number. If that happens, move your new entry into an `## Unreleased` section at the top of `CHANGELOG.md` (create the section if it no longer exists) so it is not left under an already-released version.

Commit changelog separately:

```bash
Expand Down
23 changes: 21 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ make systemTest
6. **Format and regenerate**: Once done, format code and regenerate .api files: `./gradlew spotlessApply apiDump`
7. **Propose commit**: As final step, git stage relevant files and propose (but not execute) a single git commit command

## Repository Skills

This repo ships task-specific skills (declared in `agents.toml`, sources under `.agents/skills`). Prefer them over performing the steps manually:
- **`create-java-pr`**: Branch, format, `apiDump`, commit, push, open PR, and add the changelog entry (automates the PR workflow above)
- **`test`**: Run unit or system tests for a module or a specific class
- **`check-code-attribution`**: Verify third-party code attribution on the current branch (see Third-Party Code Attribution below)
- **`btrace-perfetto`**: Capture and compare Perfetto traces for Android performance work

## Module Architecture

The repository is organized into multiple modules:
Expand All @@ -100,15 +108,22 @@ The repository is organized into multiple modules:
- **`sentry`** - Core Java SDK implementation
- **`sentry-android-core`** - Core Android SDK implementation
- **`sentry-android`** - High-level Android SDK
- **`sentry-android-ndk`** - Native (NDK) crash handling

### Integration Modules
- **Spring Framework**: `sentry-spring*`, `sentry-spring-boot*`
- **Logging**: `sentry-logback`, `sentry-log4j2`, `sentry-jul`
- **Web**: `sentry-servlet*`, `sentry-okhttp`, `sentry-apache-http-client-5`
- **Logging**: `sentry-logback`, `sentry-log4j2`, `sentry-jul`, `sentry-android-timber`
- **Web**: `sentry-servlet*`, `sentry-okhttp`, `sentry-openfeign`, `sentry-apache-http-client-5`
- **GraphQL**: `sentry-graphql*`, `sentry-apollo*`
- **Android UI**: `sentry-android-fragment`, `sentry-android-navigation`, `sentry-compose`
- **Session Replay**: `sentry-android-replay`
- **Database**: `sentry-jdbc`, `sentry-android-sqlite`, `sentry-jcache`
- **Reactive**: `sentry-reactor`, `sentry-ktor-client`
- **Feature Flags**: `sentry-launchdarkly-android`, `sentry-launchdarkly-server`, `sentry-openfeature`
- **Queues**: `sentry-kafka`
- **Profiling**: `sentry-async-profiler` (JVM continuous profiling)
- **Monitoring**: `sentry-opentelemetry*`, `sentry-quartz`
- **Other**: `sentry-spotlight`, `sentry-kotlin-extensions`, `sentry-android-distribution`

### Utility Modules
- **`sentry-test-support`** - Shared test utilities
Expand Down Expand Up @@ -171,6 +186,10 @@ gh pr view <branch-name> --json number -q '.number'
gh pr view --json url -q '.url'
```

### Changelog

User-facing changes get an entry under the `## Unreleased` section of `CHANGELOG.md`. When rebasing onto `main`, a release may have renamed the `## Unreleased` heading your entry was under to a version number โ€” if so, move your entry back into an `## Unreleased` section at the top of the file (create it if it no longer exists). See `.cursor/rules/pr.mdc` for the full changelog and PR workflow.

## Useful Resources

- Main SDK documentation: https://develop.sentry.dev/sdk/overview/
Expand Down
Loading