Skip to content

Commit cad68ab

Browse files
authored
Merge branch 'main' into romtsn-patch-1
2 parents e3cdbfa + 8fcc5df commit cad68ab

129 files changed

Lines changed: 6195 additions & 106 deletions

File tree

Some content is hidden

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

.agents/skills

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.claude/skills

.claude/skills/test/SKILL.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
name: test
3+
description: Run tests for a specific SDK module. Use when asked to "run tests", "test module", "run unit tests", "run system tests", "run e2e tests", or test a specific class. Auto-detects unit vs system tests. Supports interactive mode.
4+
allowed-tools: Bash, Read, Glob, AskUserQuestion
5+
argument-hint: [interactive] <module-name-or-file-path> [test-class-filter]
6+
---
7+
8+
# Run Tests
9+
10+
Run tests for a specific module. Auto-detects whether to run unit tests or system tests.
11+
12+
## Step 0: Check for Interactive Mode
13+
14+
If `$ARGUMENTS` starts with `interactive` (e.g., `/test interactive sentry ScopesTest`), enable interactive mode. Strip the `interactive` keyword from the arguments before proceeding.
15+
16+
In interactive mode, use AskUserQuestion at decision points as described in the steps below.
17+
18+
## Step 1: Parse the Argument
19+
20+
The argument can be either:
21+
- A **file path** (e.g., `@sentry/src/test/java/io/sentry/ScopesTest.kt`)
22+
- A **module name** (e.g., `sentry-android-core`, `sentry-samples-spring-boot-4`)
23+
- A **module name + test filter** (e.g., `sentry ScopesTest`)
24+
25+
Extract the module name and optional test class filter from the argument.
26+
27+
**Interactive mode:** If the test filter is ambiguous (e.g., matches multiple test classes across modules), use AskUserQuestion to let the user pick which test class(es) to run.
28+
29+
## Step 2: Detect Test Type
30+
31+
| Signal | Test Type |
32+
|--------|-----------|
33+
| Path contains `sentry-samples/` | System test |
34+
| Module name starts with `sentry-samples-` | System test |
35+
| Everything else | Unit test |
36+
37+
## Step 3a: Run Unit Tests
38+
39+
Determine the Gradle test task:
40+
41+
| Module Pattern | Test Task |
42+
|---------------|-----------|
43+
| `sentry-android-*` | `testDebugUnitTest` |
44+
| `sentry-compose*` | `testDebugUnitTest` |
45+
| `*-android` | `testDebugUnitTest` |
46+
| Everything else | `test` |
47+
48+
**Interactive mode:** Before running, read the test class file and use AskUserQuestion to ask:
49+
- "Run all tests in this class, or a specific method?" — list the test method names as options.
50+
51+
If the user picks a specific method, use `--tests="*ClassName.methodName"` as the filter.
52+
53+
With a test class filter:
54+
```bash
55+
./gradlew ':<module>:<task>' --tests="*<filter>*" --info
56+
```
57+
58+
Without a filter:
59+
```bash
60+
./gradlew ':<module>:<task>' --info
61+
```
62+
63+
## Step 3b: Run System Tests
64+
65+
System tests require the Python-based test runner which manages a mock Sentry server and sample app lifecycle.
66+
67+
1. Ensure the Python venv exists:
68+
```bash
69+
test -d .venv || make setupPython
70+
```
71+
72+
2. Extract the sample module name. For file paths like `sentry-samples/<sample-module>/src/...`, the sample module is the directory name (e.g., `sentry-samples-spring`).
73+
74+
3. Run the system test:
75+
```bash
76+
.venv/bin/python test/system-test-runner.py test --module <sample-module>
77+
```
78+
79+
This starts the mock Sentry server, starts the sample app (Spring Boot/Tomcat/CLI), runs tests via `./gradlew :sentry-samples:<sample-module>:systemTest`, and cleans up afterwards.
80+
81+
## Step 4: Report Results
82+
83+
Summarize the test outcome:
84+
- Total tests run, passed, failed, skipped
85+
- For failures: show the failing test name and the assertion/error message

.github/workflows/spring-boot-4-matrix.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,13 @@ jobs:
132132
--auto-init "false" \
133133
--build "true"
134134
135-
# needs a fix in opentelemetry-spring-boot-starter
136-
# - name: Run sentry-samples-spring-boot-4-opentelemetry-noagent
137-
# run: |
138-
# python3 test/system-test-runner.py test \
139-
# --module "sentry-samples-spring-boot-4-opentelemetry-noagent" \
140-
# --agent false \
141-
# --auto-init "true" \
142-
# --build "true"
135+
- name: Run sentry-samples-spring-boot-4-opentelemetry-noagent
136+
run: |
137+
python3 test/system-test-runner.py test \
138+
--module "sentry-samples-spring-boot-4-opentelemetry-noagent" \
139+
--agent false \
140+
--auto-init "true" \
141+
--build "true"
143142
144143
- name: Run sentry-samples-spring-7
145144
run: |

.github/workflows/system-tests-backend.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
- sample: "sentry-samples-spring-boot-4-webflux"
7373
agent: "false"
7474
agent-auto-init: "true"
75-
# - sample: "sentry-samples-spring-boot-4-opentelemetry-noagent"
76-
# agent: "false"
77-
# agent-auto-init: "true"
75+
- sample: "sentry-samples-spring-boot-4-opentelemetry-noagent"
76+
agent: "false"
77+
agent-auto-init: "true"
7878
- sample: "sentry-samples-spring-boot-4-opentelemetry"
7979
agent: "true"
8080
agent-auto-init: "true"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ local.properties
1313
**/sentry-native-local
1414
target/
1515
.classpath
16+
.factorypath
1617
.project
1718
.settings/
1819
bin/
@@ -30,5 +31,6 @@ spy.log
3031
**/tomcat.8080/webapps/
3132
**/__pycache__
3233

33-
# Local Claude Code settings that should not be committed
34+
# Local Claude Code settings/state that should not be committed
3435
.claude/settings.local.json
36+
.claude/worktrees/

.pi/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"skills": [
3+
"../.claude/skills"
4+
],
5+
"enableSkillCommands": true
6+
}

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# Changelog
22

3-
## Unreleased
3+
## 8.37.0
4+
5+
### Fixes
6+
7+
- Session Replay: Fix Compose text masking mismatch with weighted text ([#5218](https://github.com/getsentry/sentry-java/pull/5218))
48

59
### Features
610

11+
- Add cache tracing instrumentation for Spring Boot 2, 3, and 4 ([#5165](https://github.com/getsentry/sentry-java/pull/5165))
12+
- Wraps Spring `CacheManager` and `Cache` beans to produce cache spans
13+
- Set `sentry.enable-cache-tracing` to `true` to enable this feature
14+
- Add JCache (JSR-107) cache tracing via new `sentry-jcache` module ([#5165](https://github.com/getsentry/sentry-java/pull/5165))
15+
- Wraps JCache `Cache` with `SentryJCacheWrapper` to produce cache spans
16+
- Set the `enableCacheTracing` option to `true` to enable this feature
17+
- Add configurable `IScopesStorageFactory` to `SentryOptions` for providing a custom `IScopesStorage`, e.g. when the default `ThreadLocal`-backed storage is incompatible with non-pinning thread models ([#5199](https://github.com/getsentry/sentry-java/pull/5199))
718
- Android: Add `beforeErrorSampling` callback to Session Replay ([#5214](https://github.com/getsentry/sentry-java/pull/5214))
819
- Allows filtering which errors trigger replay capture before the `onErrorSampleRate` is checked
920
- Returning `false` skips replay capture entirely for that error; returning `true` proceeds with the normal sample rate check
@@ -23,6 +34,12 @@
2334
- Bump Native SDK from v0.13.2 to v0.13.3 ([#5215](https://github.com/getsentry/sentry-java/pull/5215))
2435
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0133)
2536
- [diff](https://github.com/getsentry/sentry-native/compare/0.13.2...0.13.3)
37+
- Bump OpenTelemetry ([#5225](https://github.com/getsentry/sentry-java/pull/5225))
38+
- `opentelemetry` to `1.60.1` (was `1.57.0`)
39+
- `opentelemetry-instrumentation` to `2.26.0` (was `2.23.0`)
40+
- `opentelemetry-instrumentation-alpha` to `2.26.0-alpha` (was `2.23.0-alpha`)
41+
- `opentelemetry-semconv` to `1.40.0` (was `1.37.0`)
42+
- `opentelemetry-semconv-alpha` to `1.40.0-alpha` (was `1.37.0-alpha`)
2643

2744
## 8.36.0
2845

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Sentry SDK for Java and Android
5757
| sentry-graphql | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-graphql?style=for-the-badge&logo=sentry&color=green) |
5858
| sentry-graphql-core | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-graphql-core?style=for-the-badge&logo=sentry&color=green) |
5959
| sentry-graphql-22 | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-graphql-22?style=for-the-badge&logo=sentry&color=green) |
60+
| sentry-jcache | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-jcache?style=for-the-badge&logo=sentry&color=green) |
6061
| sentry-quartz | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-quartz?style=for-the-badge&logo=sentry&color=green) |
6162
| sentry-openfeign | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-openfeign?style=for-the-badge&logo=sentry&color=green) |
6263
| sentry-openfeature | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-openfeature?style=for-the-badge&logo=sentry&color=green) |

buildSrc/src/main/java/Config.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ object Config {
7777
val SENTRY_GRAPHQL_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.graphql"
7878
val SENTRY_GRAPHQL_CORE_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.graphql-core"
7979
val SENTRY_GRAPHQL22_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.graphql22"
80+
val SENTRY_JCACHE_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.jcache"
8081
val SENTRY_QUARTZ_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.quartz"
8182
val SENTRY_JDBC_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.jdbc"
8283
val SENTRY_OPENFEATURE_SDK_NAME = "$SENTRY_JAVA_SDK_NAME.openfeature"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android.useAndroidX=true
1212
android.experimental.lint.version=8.9.0
1313

1414
# Release information
15-
versionName=8.36.0
15+
versionName=8.37.0
1616

1717
# Override the SDK name on native crashes on Android
1818
sentryAndroidSdkName=sentry.native.android

0 commit comments

Comments
 (0)