Skip to content

Commit d2c10f0

Browse files
Merge branch 'main' into webb/animalsniffer
2 parents 509a42d + 4c4fed9 commit d2c10f0

File tree

122 files changed

+1947
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1947
-210
lines changed

.cursor/rules/new_module.mdc

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
description: Module Addition Rules for sentry-java
3+
alwaysApply: false
4+
---
5+
# Module Addition Rules for sentry-java
6+
7+
## Overview
8+
9+
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.
10+
11+
## Step-by-Step Process
12+
13+
### 1. Create the Module Structure
14+
15+
1. Create the new module, conforming to the existing naming conventions and build scripts
16+
17+
2. Add the module to the include list in `settings.gradle.kts`
18+
19+
If adding a `sentry-samples` module, also add it to the `ignoredProjects` list in the root `build.gradle.kts`:
20+
21+
```kotlin
22+
ignoredProjects.addAll(
23+
listOf(
24+
// ... existing projects ...
25+
"sentry-samples-{module-name}"
26+
)
27+
)
28+
```
29+
30+
3. If adding a JVM sample, add E2E (system) tests, following the structure we have in the existing JVM examples.
31+
The test should then be added to `test/system-test-runner.py` and `.github/workflows/system-tests-backend.yml`.
32+
33+
### 2. Create Module Documentation
34+
35+
Create a `README.md` in the module directory with the following structure:
36+
37+
```markdown
38+
# sentry-{module-name}
39+
40+
This module provides an integration for [Technology/Framework Name].
41+
42+
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}/).
43+
```
44+
45+
The following tasks are required only when adding a module that isn't a sample.
46+
47+
### 3. Update Main README.md
48+
49+
Add the new module to the packages table in the main `README.md` with a placeholder link to the badge:
50+
51+
```markdown
52+
| 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}) | |
53+
```
54+
55+
Note that the badge will only work after the module is released to Maven Central.
56+
57+
### 4. Add Documentation to docs.sentry.io
58+
59+
Add the necessary documentation to [docs.sentry.io](https://docs.sentry.io):
60+
- For Java modules: Add to Java platform docs, usually in integrations section
61+
- For Android modules: Add to Android platform docs, usually in integrations section
62+
- Include installation instructions, configuration options, and usage examples
63+
64+
### 5. Post release tasks
65+
66+
Remind the user to perform the following tasks after the module is merged and released:
67+
68+
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)
69+
70+
2. Add the module to `.craft.yml` in the `sdks` section:
71+
```yaml
72+
sdks:
73+
# ... existing modules ...
74+
maven:io.sentry:sentry-{module-name}:
75+
```
76+
77+
## Module Naming Conventions
78+
79+
- Use kebab-case for module names: `sentry-{module-name}`
80+
- Follow existing patterns: `sentry-okhttp`, `sentry-apollo-4`, `sentry-spring-boot`
81+
- For version-specific modules, include the version: `sentry-apollo-3`, `sentry-apollo-4`
82+
83+
## Important Notes
84+
85+
1. **API Files**: Do not modify `.api` files manually. Run `./gradlew apiDump` to regenerate them
86+
2. **Backwards Compatibility**: Ensure new features are opt-in by default
87+
3. **Testing**: Write comprehensive tests for all new functionality
88+
4. **Documentation**: Always include proper documentation and examples

.cursor/rules/overview_dev.mdc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Use the `fetch_rules` tool to include these rules when working on specific areas
4242
- `OtelSpanFactory`, `SentrySpanExporter`
4343
- Tracing, distributed tracing
4444

45+
- **`new_module`**: Use when adding a new integration or sample module
46+
4547
### Testing
4648
- **`e2e_tests`**: Use when working with:
4749
- System tests, sample applications
@@ -58,5 +60,6 @@ Use the `fetch_rules` tool to include these rules when working on specific areas
5860
- Scope/Hub/forking → `scopes`
5961
- Duplicate/dedup → `deduplication`
6062
- OpenTelemetry/tracing/spans → `opentelemetry`
63+
- new module/integration/sample → `new_module`
6164
- Cache/offline/network → `offline`
6265
- System test/e2e/sample → `e2e_tests`

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66
<!--- Why is this change required? What problem does it solve? -->
77
<!--- If it fixes an open issue, please link to the issue here. -->
88

9+
<!--
10+
* resolves: #1234
11+
* resolves: LIN-1234
12+
-->
913

1014
## :green_heart: How did you test it?
1115

1216

1317
## :pencil: Checklist
1418
<!--- Put an `x` in the boxes that apply -->
1519

20+
- [ ] I added GH Issue ID _&_ Linear ID
1621
- [ ] I added tests to verify the changes.
1722
- [ ] No new PII added or SDK only sends newly added PII if `sendDefaultPII` is enabled.
1823
- [ ] I updated the docs if needed.

.github/workflows/agp-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
java-version: '17'
4040

4141
- name: Setup Gradle
42-
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3
42+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a
4343
with:
4444
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4545

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }}
3838

3939
- name: Setup Gradle
40-
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3
40+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a
4141
with:
4242
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
4343

.github/workflows/changes-in-high-risk-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Comment on PR to notify of changes in high risk files
37-
uses: actions/github-script@v7
37+
uses: actions/github-script@v8
3838
env:
3939
high_risk_code: ${{ needs.files-changed.outputs.high_risk_code_files }}
4040
with:

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
java-version: '17'
3232

3333
- name: Setup Gradle
34-
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3
34+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a
3535
with:
3636
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # pin@v2
39+
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # 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@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # pin@v2
48+
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # pin@v2

.github/workflows/enforce-license-compliance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Setup Gradle
14-
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3
14+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a
1515

1616
- name: Set up Java
1717
uses: actions/setup-java@v5
@@ -20,7 +20,7 @@ jobs:
2020
java-version: '17'
2121

2222
- name: Checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424

2525
# TODO: remove this when upstream is fixed
2626
- name: Disable Gradle configuration cache (see https://github.com/fossas/fossa-cli/issues/872)

.github/workflows/format-code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
java-version: '17'
2020

2121
- name: Setup Gradle
22-
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3
22+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a
2323
with:
2424
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
2525

.github/workflows/generate-javadocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
java-version: '17'
2121

2222
- name: Setup Gradle
23-
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3
23+
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a
2424

2525
- name: Generate Aggregate Javadocs
2626
run: |

0 commit comments

Comments
 (0)