Skip to content

Commit 13094aa

Browse files
authored
Merge branch 'main' into fix/callback-error-handling
2 parents 6dffaa7 + 9122a68 commit 13094aa

17 files changed

Lines changed: 289 additions & 41 deletions

‎.craft.yml‎

Lines changed: 236 additions & 0 deletions
Large diffs are not rendered by default.

‎.cursor/rules/new_module.mdc‎

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ alwaysApply: false
88

99
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.
1010

11+
## Publishing Gate
12+
13+
Nothing below is enforced by the build, so a module can look finished, pass CI, and still break
14+
the release that first ships it. All of the following have to be merged **before** that release:
15+
16+
- The module is in the include list in `settings.gradle.kts` (step 1.2)
17+
- Android (AAR) modules are in `Config.BuildScript.androidLibs` (step 1.4)
18+
- The module has a row in the packages table in the main `README.md` (step 3)
19+
- The module is in the integrations dropdown of the matching issue template (step 4)
20+
- The docs page exists on docs.sentry.io (step 5), because `.craft.yml` has to point at a live URL
21+
- The module has a full entry in the `registry` target of `.craft.yml` (step 6) — **this one
22+
fails the release itself**, not just the module
23+
1124
## Step-by-Step Process
1225

1326
### 1. Create the Module Structure
@@ -39,10 +52,12 @@ val SENTRY_FOO_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.foo"
3952
The module's `build.gradle.kts` consumes it in both `buildConfig` and the jar manifest
4053
(`Sentry-SDK-Name` / `Sentry-SDK-Package-Name`) — see `sentry-kafka/build.gradle.kts`.
4154

42-
4. Add the instrumented library to `gradle/libs.versions.toml` and depend on it with
55+
4. For an Android module, add the artifact id to `androidLibs` in `buildSrc/src/main/java/Config.kt`.
56+
57+
5. Add the instrumented library to `gradle/libs.versions.toml` and depend on it with
4358
`compileOnly(libs.<lib>)`, so the integration does not force the dependency on users.
4459

45-
5. Register the integration with the SDK so it is reported in the `sdk` payload. Every
60+
6. Register the integration with the SDK so it is reported in the `sdk` payload. Every
4661
integration does this — see `sentry-openfeature/.../SentryOpenFeatureHook.java`:
4762

4863
```java
@@ -54,24 +69,16 @@ static {
5469
addIntegrationToSdkVersion("{IntegrationName}");
5570
```
5671

57-
6. If adding a JVM sample, add E2E (system) tests, following the structure we have in the existing JVM examples.
72+
7. If adding a JVM sample, add E2E (system) tests, following the structure we have in the existing JVM examples.
5873
The test should then be added to `test/system-test-runner.py` and `.github/workflows/system-tests-backend.yml`.
5974

6075
`sentry-bom` and the root `build.gradle.kts` need no change — they iterate over subprojects.
6176

6277
### 2. Create Module Documentation
6378

64-
Create a `README.md` in the module directory with the following structure:
65-
66-
```markdown
67-
# sentry-{module-name}
79+
Create a `README.md` in the module directory: the module name as the heading, what it instruments, and a high level overview.
6880

69-
This module provides an integration for [Technology/Framework Name].
70-
71-
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}/).
72-
```
73-
74-
The following tasks are required only when adding a module that isn't a sample.
81+
Steps 3 to 6 are required only when adding a module that isn't a sample.
7582

7683
### 3. Update Main README.md
7784

@@ -97,18 +104,9 @@ Add the necessary documentation to [docs.sentry.io](https://docs.sentry.io):
97104
- For Android modules: Add to Android platform docs, usually in integrations section
98105
- Include installation instructions, configuration options, and usage examples
99106

100-
### 6. Post release tasks
101-
102-
Remind the user to perform the following tasks after the module is merged and released:
103-
104-
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)
107+
### 6. Add the Module to `.craft.yml`
105108

106-
2. Add the module to `.craft.yml` in the `sdks` section:
107-
```yaml
108-
sdks:
109-
# ... existing modules ...
110-
maven:io.sentry:sentry-{module-name}:
111-
```
109+
Add the module to the `registry` target in `.craft.yml`, including all metadata fields.
112110

113111
## Module Naming Conventions
114112

‎.github/workflows/agp-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494

9595
- name: Upload test results
9696
if: always()
97-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
97+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
9898
with:
9999
name: test-results-AGP${{ matrix.agp }}-Integrations${{ matrix.integrations }}
100100
path: |

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161

6262
- name: Upload test results
6363
if: always()
64-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
64+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
6565
with:
6666
name: test-results-build
6767
path: |

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # pin@v2
39+
uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # pin@v2
4040
with:
4141
languages: 'java'
4242

@@ -45,4 +45,4 @@ jobs:
4545
./gradlew buildForCodeQL --no-build-cache
4646
4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # pin@v2
48+
uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # pin@v2

‎.github/workflows/integration-tests-macrobenchmark.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
--json-out ./artifacts/benchmarkData.json | tee -a "$GITHUB_STEP_SUMMARY"
5858
5959
- name: Upload Sauce artifacts
60-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
60+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
6161
if: ${{ !cancelled() }}
6262
with:
6363
name: macrobenchmark-results

‎.github/workflows/integration-tests-ui-critical.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: make assembleUiTestCriticalRelease
4545

4646
- name: Upload APK artifact
47-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
47+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
4848
with:
4949
name: ${{env.APK_ARTIFACT_NAME}}
5050
path: "${{env.BASE_PATH}}/${{env.BUILD_PATH}}/${{env.APK_NAME}}"
@@ -137,7 +137,7 @@ jobs:
137137
script: echo "Generated AVD snapshot for caching."
138138

139139
- name: Download APK artifact
140-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
140+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
141141
with:
142142
name: ${{env.APK_ARTIFACT_NAME}}
143143

@@ -164,7 +164,7 @@ jobs:
164164
165165
- name: Upload Maestro test results
166166
if: ${{ always() }}
167-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
167+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
168168
with:
169169
name: maestro-logs-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}
170170
path: "${{env.BASE_PATH}}/maestro-logs"

‎.github/workflows/release-build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: make publish
3333

3434
- name: Upload artifacts
35-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
35+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
3636
with:
3737
name: ${{ github.sha }}
3838
if-no-files-found: error

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fetch-depth: 0
3535
submodules: 'recursive'
3636
- name: Prepare release
37-
uses: getsentry/craft@d5039704fa236d5e7c7a3ff12862238b65d18385 # v2.33.2
37+
uses: getsentry/craft@3f2abdc5703191d12ef2cc013f792f1bd220f44d # v2.34.1
3838
env:
3939
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
4040
with:

‎.github/workflows/spring-boot-2-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
132132
- name: Upload test results
133133
if: always()
134-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
134+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
135135
with:
136136
name: test-results-springboot-2-${{ matrix.springboot-version }}
137137
path: |

0 commit comments

Comments
 (0)