From 185f52b5c629102ed715f98b80bcdc52fa814f10 Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Wed, 13 Aug 2025 15:23:42 +0200 Subject: [PATCH 1/7] Add more AI rules --- .cursor/rules/deduplication.mdc | 13 ++++ .cursor/rules/e2e_tests.mdc | 28 ++++++++ .cursor/rules/overview_dev.mdc | 62 ++++++++++++++++++ .cursor/rules/scopes.mdc | 112 ++++++++++++++++++++++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 .cursor/rules/deduplication.mdc create mode 100644 .cursor/rules/e2e_tests.mdc create mode 100644 .cursor/rules/overview_dev.mdc create mode 100644 .cursor/rules/scopes.mdc diff --git a/.cursor/rules/deduplication.mdc b/.cursor/rules/deduplication.mdc new file mode 100644 index 00000000000..b48516dae44 --- /dev/null +++ b/.cursor/rules/deduplication.mdc @@ -0,0 +1,13 @@ +--- +alwaysApply: false +description: Java SDK Event deduplication +--- + +# Java SDK Event deduplication + +To avoid sending the same error multiple times, there is deduplication logic in place in the SDK. +Duplicate captures can happen due to multiple integrations capturing the exception as well as additional manual calls to `Sentry.captureException`. + +Deduplication is performed in `DuplicateEventDetectionEventProcessor` which returns `null` when it detects a duplicate event causing it to be dropped. + +The `enableDeduplication` option can be used to opt out of deduplication. It is enabled by default. diff --git a/.cursor/rules/e2e_tests.mdc b/.cursor/rules/e2e_tests.mdc new file mode 100644 index 00000000000..4ac271ad4b0 --- /dev/null +++ b/.cursor/rules/e2e_tests.mdc @@ -0,0 +1,28 @@ +--- +alwaysApply: false +description: Java SDK End to End Tests +--- + +# Java SDK End to End Tests (System Tests) + +The samples in the `sentry-samples` directory are used to run end to end tests against them. + +There is a python script (`system-test-runner.py`) that can be used to run one (using `--module SAMPLE_NAME`) or all (using `--all` system tests. + +The script has an interactive mode (`-i`) which allows selection of test setups to execute, whether to run the tests or just prepare infrastructure for testing from IDE. + +The tests run a mock Sentry server via `system-test-sentry-server.py`. Any system under test will then have a DSN set that reflects this local mock server like `http://502f25099c204a2fbf4cb16edc5975d1@localhost:8000/0`. +By using this local DSN, the system under test sends events to the local mock server. +The tests can then use `TestHelper` to assert envelopes that were received by the mock server. +`TestHelper` uses HTTP requests to retrieve the JSON payload of the received events and deserialize them back to objects for easier assertion. +Tests can then assert events, transactions, logs etc. similar to how they would appear in `beforeSend` and similar callbacks. + +`TestHelper` has a lot of helper methods for asserting, e.g. by span name, log body etc. + +The end to end tests either expect the system under test to either be running (for server applications) or call `java -jar` to execute a CLI system under test. + +For Spring Boot, we spin up the Spring Boot server. The tests then send requests to that server and assert what is sent to Sentry. + +End to end tests are also executed on CI using a matrix build, as defined in `.github/workflows/system-tests-backend.yml`. + +Some of the samples are tested in multiple ways, e.g. with OpenTelemetry Agent auto init turned on and off. diff --git a/.cursor/rules/overview_dev.mdc b/.cursor/rules/overview_dev.mdc new file mode 100644 index 00000000000..2fc9687b5ff --- /dev/null +++ b/.cursor/rules/overview_dev.mdc @@ -0,0 +1,62 @@ +--- +alwaysApply: true +description: Sentry Java SDK - Development Rules Overview +--- + +# Sentry Java SDK Development Rules + +## Always Applied Rules + +These rules are automatically included in every conversation: +- **coding.mdc**: General contributing guidelines, build commands, and workflow rules + +## Domain-Specific Rules (Fetch Only When Needed) + +Use the `fetch_rules` tool to include these rules when working on specific areas: + +### Core SDK Functionality +- **`scopes`**: Use when working with: + - Hub/Scope management, forking, or lifecycle + - `Sentry.getCurrentScopes()`, `pushScope()`, `withScope()` + - `ScopeType` (GLOBAL, ISOLATION, CURRENT) + - Thread-local storage, scope bleeding issues + - Migration from Hub API (v7 → v8) + +- **`deduplication`**: Use when working with: + - Duplicate event detection/prevention + - `DuplicateEventDetectionEventProcessor` + - `enableDeduplication` option + +- **`offline`**: Use when working with: + - Caching, envelope storage/retrieval + - Network failure handling, retry logic + - `AsyncHttpTransport`, `EnvelopeCache` + - Rate limiting, cache rotation + - Android vs JVM caching differences + +### Integration & Infrastructure +- **`opentelemetry`**: Use when working with: + - OpenTelemetry modules (`sentry-opentelemetry-*`) + - Agent vs agentless configurations + - Span processing, sampling, context propagation + - `OtelSpanFactory`, `SentrySpanExporter` + - Tracing, distributed tracing + +### Testing +- **`e2e_tests`**: Use when working with: + - System tests, sample applications + - `system-test-runner.py`, mock Sentry server + - End-to-end test infrastructure + - CI system test workflows + +## Usage Guidelines + +1. **Start minimal**: Only include `coding.mdc` (auto-applied) for general tasks +2. **Fetch on-demand**: Use `fetch_rules ["rule_name"]` when you identify specific domain work +3. **Multiple rules**: Fetch multiple rules if task spans domains (e.g., `["scopes", "opentelemetry"]` for tracing scope issues) +4. **Context clues**: Look for these keywords in requests to determine relevant rules: + - Scope/Hub/forking → `scopes` + - Duplicate/dedup → `deduplication` + - OpenTelemetry/tracing/spans → `opentelemetry` + - Cache/offline/network → `offline` + - System test/e2e/sample → `e2e_tests` diff --git a/.cursor/rules/scopes.mdc b/.cursor/rules/scopes.mdc new file mode 100644 index 00000000000..798d07f4303 --- /dev/null +++ b/.cursor/rules/scopes.mdc @@ -0,0 +1,112 @@ +--- +alwaysApply: false +description: Java SDK Hubs and Scopes +--- +# Java SDK Hubs and Scopes + +## `Scopes` + +`Scopes` implements `IScopes` and manages three `Scope` instances, `global`, `isolation` and `current` scope. +For some data, all three `Scope` instances are combined, for others, a certain one is used exclusively and for some we look at each scope in a certain order and use the data of the first scope that has the data set. This logic is contained in `CombinedScopeView`. +Data itself is stored on `Scope` instances. +`Scopes` also has a `parent` field, linking the `Scopes` it was forked off of and a `creator` String, explaining why it was forked. + +## `Hub` + +Up until major version 7 of the Java SDK the `IHub` interface was a central part of the SDK. +In major version 8 we replaced the `IHub` interface with `IScopes`. `IHub` has been deprecated. +While there is some bridging code in place to allow for easier migration, we are planning to remove it in an upcoming major. + +## Scope Types + +We have introduced some new Scope types in the SDK, allowing for better control over what data is attached where. +Previously there was a stack of scopes that was pushed and popped. +Instead we now fork scopes for a given lifecycle and then restore the previous scopes. +Since Hub is gone, it is also never cloned anymore. +Separation of data now happens through the different scope types while making it easier to manipulate exactly what you need without having to attach data at the right time to have it apply where wanted. + +### Global Scope + +Global scope is attached to all events created by the SDK. +It can also be modified before Sentry.init has been called. +It can be manipulated using `Sentry.configureScope(ScopeType.GLOBAL, (scope) -> { ... })`. + +Global scope can be retrieved from `Scopes` via `getGlobalScope`. It can also be retrieved directly via `Sentry.getGlobalScope`. + +### Isolation Scope + +Isolation scope can be used e.g. to attach data to all events that come up while handling an incoming request. +It can also be used for other isolation purposes. +It can be manipulated using `Sentry.configureScope(ScopeType.ISOLATION, (scope) -> { ... })`. +The SDK automatically forks isolation scope in certain cases like incoming requests, CRON jobs, Spring `@Async` and more. + +Isolation scope can be retrieved from `Scopes` via `getIsolationScope`. + +### Current scope + +Current scope is forked often and data added to it is only added to events that are created while this scope is active. +Data is also passed on to newly forked child scopes but not to parents. + +Current scope can be retrieved from `Scopes` via `getScope`. + +## Storage of `Scopes` + +`Scopes` are stored in a `ThreadLocal` by default (NOTE: this is different for OpenTelemetry, see opentelemetry.mdc). +This happens through `Sentry.scopesStorage` and `DefaultScopesStorage`. + +The lifetime of `Scopes` in the thread local is managed by `ISentryLifecycleToken`. +When the scopes are forked, they are stored into the `ThreadLocal` and a `ISentryLifecycleToken` is returned. +When the `Scopes` are no longer needed, e.g. because a request is finished, `ISentryLifecycleToken.close` can be called to restore the previous state of the `ThreadLocal`. + +## Old versions of the Java SDK + +There were several implementations of the `IHub` interface: +- `Hub` managed a stack of `Scope` instances, which were pushed and popped. +- A `Hub` could be cloned, meaning there could be multiple stacks of scopes active, e.g. for two separate requests being handled in a server application. + +### Migrating to major version 8 of the SDK + +`IHub` has been replaced by `IScopes` +`HubAdapter` has been replaced by `ScopesAdapter` +`Hub.clone` should be replaced by using `pushScope` or `pushIsolationScope` +`Sentry.getCurrentHub` has been replaced by `Sentry.getCurrentScopes` +`Sentry.popScope` has been deprecated. Instead `close` should be called on the `ISentryLifecycleToken` returned e.g. by `pushScope`. This can also be done in a `try-with-resource` block. + +## `globalHubMode` +The SDK has a `globalHubMode` option which affects forking behaviour of the SDK. + +Android has `globalHubMode` enabled by default. +For JVM Desktop applications, `globalHubMode` can be used. +For JVM Backend applications (servers) we discourage enabling `globalHubMode` since it will cause scopes to bleed into each other. This can e.g. mean that state from request A leaks into request B and events sent to Sentry contain a mix of both request A and B potentially rendering the data useless. + +### Disabled + +If `globalHubMode` is enabled, the SDK avoids forking scopes. + +This means, retrieving current scopes on a thread where specific scopes for that thread exist yet, the root scopes are not forked but returned directly. +The SDK also doesn't fork scopes when `Sentry.pushScope`, `Sentry.pushIsolation`, `Sentry.withScope` or `Sentry.withIsolationScope` are executed. + +The suppression of forking via `globalHubMode` only applies when using `Sentry` static API or `ScopesAdapter`. +In case the `Scopes` instance is accessed directly, forking will happen as if `globalHubMode` is disabled. +However, while it's possible to use `Sentry.setCurrentScopes` it does not have any effect due to `Sentry.getCurrentScopes` directly returning `rootScopes` if `globalHubMode` is enabled. +This means the forked scopes have to be managed manually, e.g. by keeping a reference and accessing Sentry API via the reference instead of using static API. + +`ScopesAdapter` makes use of the static `Sentry` API internally. It allows us to access the correct scopes for the current context without passing it along explicitly. It also makes testing easier. + +### Enabled + +If `globalHubMode` is disabled, the SDK forks scopes freely, e.g. when: +- `Sentry.getCurrentScopes()` is executed on a Thread where no specific scopes for that thread have been stored yet. In this case the SDK will fork `rootScopes` (stored in a `Sentry` static property). +- `withScope` or `withIsolationScope` are executed +- `pushScope` or `pushIsolationScope` are executed + +## `defaultScopeType` + +The `defaultScopeType` controls which `Scope` instance is being used for writing to and reading from as a default value. +When using API like `Sentry.setTag` the SDK adds that tag to the default `Scope`. + +This also ensures, customers who migrate to the latest SDK version and already have `Sentry.configureScope` invocations in place, will now write to the default `Scope` instance that was chosen. + +The default value for `defaultScopeType` is `ISOLATION` scope for JVM and `CURRENT` scope for Android. + +Which fields are written/read from/to `defaultScopeType` is controlled in `CombinedScopeView`. From e4f0b8d3571fe43c11f13c3441efce438050d73f Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Mon, 18 Aug 2025 09:22:41 +0200 Subject: [PATCH 2/7] Apply suggestions from code review Co-authored-by: Alex Alderman Webb --- .cursor/rules/e2e_tests.mdc | 4 ++-- .cursor/rules/scopes.mdc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cursor/rules/e2e_tests.mdc b/.cursor/rules/e2e_tests.mdc index 4ac271ad4b0..17e088774b5 100644 --- a/.cursor/rules/e2e_tests.mdc +++ b/.cursor/rules/e2e_tests.mdc @@ -7,7 +7,7 @@ description: Java SDK End to End Tests The samples in the `sentry-samples` directory are used to run end to end tests against them. -There is a python script (`system-test-runner.py`) that can be used to run one (using `--module SAMPLE_NAME`) or all (using `--all` system tests. +There is a python script (`system-test-runner.py`) that can be used to run one (using `--module SAMPLE_NAME`) or all (using `--all`) system tests. The script has an interactive mode (`-i`) which allows selection of test setups to execute, whether to run the tests or just prepare infrastructure for testing from IDE. @@ -19,7 +19,7 @@ Tests can then assert events, transactions, logs etc. similar to how they would `TestHelper` has a lot of helper methods for asserting, e.g. by span name, log body etc. -The end to end tests either expect the system under test to either be running (for server applications) or call `java -jar` to execute a CLI system under test. +The end to end tests either expect the system under test to either be running on a server or call `java -jar` to execute a CLI system under test. For Spring Boot, we spin up the Spring Boot server. The tests then send requests to that server and assert what is sent to Sentry. diff --git a/.cursor/rules/scopes.mdc b/.cursor/rules/scopes.mdc index 798d07f4303..0d0f7bcdf28 100644 --- a/.cursor/rules/scopes.mdc +++ b/.cursor/rules/scopes.mdc @@ -83,7 +83,7 @@ For JVM Backend applications (servers) we discourage enabling `globalHubMode` si If `globalHubMode` is enabled, the SDK avoids forking scopes. -This means, retrieving current scopes on a thread where specific scopes for that thread exist yet, the root scopes are not forked but returned directly. +This means, retrieving current scopes on a thread where specific scopes do not exist yet for the thread, the root scopes are not forked but returned directly. The SDK also doesn't fork scopes when `Sentry.pushScope`, `Sentry.pushIsolation`, `Sentry.withScope` or `Sentry.withIsolationScope` are executed. The suppression of forking via `globalHubMode` only applies when using `Sentry` static API or `ScopesAdapter`. From dba4b32772c9278cda7a86a69695eb4e5c3e8b6f Mon Sep 17 00:00:00 2001 From: Alexander Dinauer Date: Mon, 18 Aug 2025 09:27:41 +0200 Subject: [PATCH 3/7] Apply suggestions from code review --- .cursor/rules/scopes.mdc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cursor/rules/scopes.mdc b/.cursor/rules/scopes.mdc index 0d0f7bcdf28..179b0943565 100644 --- a/.cursor/rules/scopes.mdc +++ b/.cursor/rules/scopes.mdc @@ -79,7 +79,7 @@ Android has `globalHubMode` enabled by default. For JVM Desktop applications, `globalHubMode` can be used. For JVM Backend applications (servers) we discourage enabling `globalHubMode` since it will cause scopes to bleed into each other. This can e.g. mean that state from request A leaks into request B and events sent to Sentry contain a mix of both request A and B potentially rendering the data useless. -### Disabled +### Enabled If `globalHubMode` is enabled, the SDK avoids forking scopes. @@ -93,7 +93,7 @@ This means the forked scopes have to be managed manually, e.g. by keeping a refe `ScopesAdapter` makes use of the static `Sentry` API internally. It allows us to access the correct scopes for the current context without passing it along explicitly. It also makes testing easier. -### Enabled +### Disabled If `globalHubMode` is disabled, the SDK forks scopes freely, e.g. when: - `Sentry.getCurrentScopes()` is executed on a Thread where no specific scopes for that thread have been stored yet. In this case the SDK will fork `rootScopes` (stored in a `Sentry` static property). From 5595b1dab5d961d842355237b1b30b16f3c23b04 Mon Sep 17 00:00:00 2001 From: lcian Date: Mon, 25 Aug 2025 12:41:29 +0200 Subject: [PATCH 4/7] Add Cursor rules to add and release new modules --- .cursor/rules/new_module.mdc | 106 +++++++++++++++++++++++++++++++++ .cursor/rules/overview_dev.mdc | 3 + 2 files changed, 109 insertions(+) create mode 100644 .cursor/rules/new_module.mdc diff --git a/.cursor/rules/new_module.mdc b/.cursor/rules/new_module.mdc new file mode 100644 index 00000000000..7b373d06b21 --- /dev/null +++ b/.cursor/rules/new_module.mdc @@ -0,0 +1,106 @@ +--- +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 + +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. 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`. + +### 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}/). +``` + +### 4. Update Main README.md + +Add the new module to the packages table in the main `README.md` with a placeholder link to the badge: + +```markdown +| sentry-{module-name} | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-{module-name}/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-{module-name}) | | +``` + +Note that the badge will only work after the module is released to Maven Central. + +### 5. (After releasee) Add to Sentry Release Registry + +Follow the instructions in the [sentry-release-registry README](https://github.com/getsentry/sentry-release-registry#adding-new-sdks): + +1. Create `packages/maven/io.sentry/sentry-{module-name}/{version}.json` for the latest version +2. Add the following JSON structure: + ```json + { + "name": "io.sentry:sentry-{module-name}", + "canonical": "maven:io.sentry:sentry-{module-name}", + "version": "{version}", + "package_url": "https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-{module-name}", + "repo_url": "https://github.com/getsentry/sentry-java", + "main_docs_url": "https://docs.sentry.io/platforms/java/tracing/instrumentation/{module-name}/" + } + ``` + (adjust the docs URL accordingly) +3. Create symlink: `cd sdks && ln -s ../packages/maven/io.sentry/sentry-{module-name} sentry.java.sentry-{module-name}` +4. Run `make sync-all-links` to fix up symlinks +5. Raise a PR to the sentry-release-registry repository and get it merged + +### 6. 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 + +### 7. Release the SDK + +After the module is implemented and tested: + +1. Release the SDK through the normal release process +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` + +## Important Notes + +1. **API Files**: Do not modify `.api` files manually. Run `./gradlew apiDump` to regenerate them +2. **Backwards Compatibility**: Ensure new features are opt-in by default +3. **Testing**: Write comprehensive tests for all new functionality +4. **Documentation**: Always include proper documentation and examples diff --git a/.cursor/rules/overview_dev.mdc b/.cursor/rules/overview_dev.mdc index 2fc9687b5ff..89c70e2c158 100644 --- a/.cursor/rules/overview_dev.mdc +++ b/.cursor/rules/overview_dev.mdc @@ -42,6 +42,8 @@ Use the `fetch_rules` tool to include these rules when working on specific areas - `OtelSpanFactory`, `SentrySpanExporter` - Tracing, distributed tracing +- **`new_module`**: Use when adding a new integration or sample module + ### Testing - **`e2e_tests`**: Use when working with: - System tests, sample applications @@ -58,5 +60,6 @@ Use the `fetch_rules` tool to include these rules when working on specific areas - Scope/Hub/forking → `scopes` - Duplicate/dedup → `deduplication` - OpenTelemetry/tracing/spans → `opentelemetry` + - new module/integration/sample → `new_module` - Cache/offline/network → `offline` - System test/e2e/sample → `e2e_tests` From 3037fde98b179f6f4b08c483868cb0e30c8dd318 Mon Sep 17 00:00:00 2001 From: lcian Date: Mon, 25 Aug 2025 12:45:17 +0200 Subject: [PATCH 5/7] improve --- .cursor/rules/new_module.mdc | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.cursor/rules/new_module.mdc b/.cursor/rules/new_module.mdc index 7b373d06b21..0690b273197 100644 --- a/.cursor/rules/new_module.mdc +++ b/.cursor/rules/new_module.mdc @@ -52,40 +52,22 @@ Add the new module to the packages table in the main `README.md` with a placehol Note that the badge will only work after the module is released to Maven Central. -### 5. (After releasee) Add to Sentry Release Registry - -Follow the instructions in the [sentry-release-registry README](https://github.com/getsentry/sentry-release-registry#adding-new-sdks): - -1. Create `packages/maven/io.sentry/sentry-{module-name}/{version}.json` for the latest version -2. Add the following JSON structure: - ```json - { - "name": "io.sentry:sentry-{module-name}", - "canonical": "maven:io.sentry:sentry-{module-name}", - "version": "{version}", - "package_url": "https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-{module-name}", - "repo_url": "https://github.com/getsentry/sentry-java", - "main_docs_url": "https://docs.sentry.io/platforms/java/tracing/instrumentation/{module-name}/" - } - ``` - (adjust the docs URL accordingly) -3. Create symlink: `cd sdks && ln -s ../packages/maven/io.sentry/sentry-{module-name} sentry.java.sentry-{module-name}` -4. Run `make sync-all-links` to fix up symlinks -5. Raise a PR to the sentry-release-registry repository and get it merged - -### 6. Add Documentation to docs.sentry.io +### 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 -### 7. Release the SDK +### 6. Release the SDK After the module is implemented and tested: 1. Release the SDK through the normal release process -2. Add the module to `.craft.yml` in the `sdks` section: + +2. 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). + +3. Add the module to `.craft.yml` in the `sdks` section: ```yaml sdks: # ... existing modules ... From f6f23483ea44ffa999f2f68ed70d68d7f00fbef2 Mon Sep 17 00:00:00 2001 From: lcian Date: Mon, 25 Aug 2025 12:47:19 +0200 Subject: [PATCH 6/7] improve --- .cursor/rules/new_module.mdc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.cursor/rules/new_module.mdc b/.cursor/rules/new_module.mdc index 0690b273197..a8d632d4660 100644 --- a/.cursor/rules/new_module.mdc +++ b/.cursor/rules/new_module.mdc @@ -59,15 +59,13 @@ Add the necessary documentation to [docs.sentry.io](https://docs.sentry.io): - For Android modules: Add to Android platform docs, usually in integrations section - Include installation instructions, configuration options, and usage examples -### 6. Release the SDK +### 6. Post release tasks -After the module is implemented and tested: +Remind the user to perform the following tasks after the module is merged and released: -1. Release the SDK through the normal release process +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 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). - -3. Add the module to `.craft.yml` in the `sdks` section: +2. Add the module to `.craft.yml` in the `sdks` section: ```yaml sdks: # ... existing modules ... From 84dca2e46b2a84163603b9f93321aa1b98210a2c Mon Sep 17 00:00:00 2001 From: Lorenzo Cian Date: Fri, 12 Sep 2025 15:58:05 +0200 Subject: [PATCH 7/7] address comments --- .cursor/rules/new_module.mdc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.cursor/rules/new_module.mdc b/.cursor/rules/new_module.mdc index a8d632d4660..5bf2c70c2f7 100644 --- a/.cursor/rules/new_module.mdc +++ b/.cursor/rules/new_module.mdc @@ -42,7 +42,9 @@ 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}/). ``` -### 4. Update Main README.md +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` with a placeholder link to the badge: @@ -52,14 +54,14 @@ Add the new module to the packages table in the main `README.md` with a placehol Note that the badge will only work after the module is released to Maven Central. -### 5. Add Documentation to docs.sentry.io +### 4. 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 +### 5. Post release tasks Remind the user to perform the following tasks after the module is merged and released: