Skip to content

Commit e6e75dc

Browse files
committed
Merge branch 'main' into feat/detect-oversized-error-events
2 parents 6c5011f + a416a65 commit e6e75dc

File tree

218 files changed

+6112
-3211
lines changed

Some content is hidden

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

218 files changed

+6112
-3211
lines changed

.craft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ targets:
6464
maven:io.sentry:sentry-apollo-4:
6565
maven:io.sentry:sentry-reactor:
6666
maven:io.sentry:sentry-ktor-client:
67+
maven:io.sentry:sentry-async-profiler:

.cursor/rules/feature_flags.mdc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
alwaysApply: false
3+
description: Feature Flags
4+
---
5+
# Java SDK Feature Flags
6+
7+
There is a scope based and a span based API for tracking feature flag evaluations.
8+
9+
## Scope Based API
10+
11+
The `addFeatureFlag` method can be used to track feature flag evaluations. It exists on `Sentry` static API as well as `IScopes` and `IScope`.
12+
13+
The `maxFeatureFlags` option controls how many flags are tracked per scope and also how many are sent to Sentry as part of events.
14+
Scope based feature flags can also be disabled by setting the value to 0. Defaults to 100 feature flag evaluations.
15+
16+
Order of feature flag evaluations is important as we only keep track of the last {maxFeatureFlag} items.
17+
18+
When a feature flag evluation with the same name is added, the previous one is removed and the new one is stored so that it'll be dropped last.
19+
20+
When sending out an error event, feature flag buffers from all three scope types (global, isolation and current scope) are merged, chosing the newest {maxFeatureFlag} entries across all scope types. Feature flags are sent as part of the `flags` context.
21+
22+
## Span Based API
23+
24+
tbd

.cursor/rules/overview_dev.mdc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ Use the `fetch_rules` tool to include these rules when working on specific areas
3434
- Rate limiting, cache rotation
3535
- Android vs JVM caching differences
3636

37+
- **`feature_flags`**: Use when working with:
38+
- Feature flag tracking and evaluation
39+
- `addFeatureFlag()`, `getFeatureFlags()` methods
40+
- `FeatureFlagBuffer`, `FeatureFlag` protocol
41+
- `maxFeatureFlags` option and buffer management
42+
- Feature flag merging across scope types
43+
- Scope-based vs span-based feature flag APIs
44+
3745
### Integration & Infrastructure
3846
- **`opentelemetry`**: Use when working with:
3947
- OpenTelemetry modules (`sentry-opentelemetry-*`)
@@ -63,3 +71,4 @@ Use the `fetch_rules` tool to include these rules when working on specific areas
6371
- new module/integration/sample → `new_module`
6472
- Cache/offline/network → `offline`
6573
- System test/e2e/sample → `e2e_tests`
74+
- Feature flag/addFeatureFlag/flag evaluation → `feature_flags`

.github/workflows/agp-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Create AVD and generate snapshot for caching
6262
if: steps.avd-cache.outputs.cache-hit != 'true'
63-
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2
63+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # pin@v2
6464
with:
6565
api-level: 30
6666
target: aosp_atd
@@ -79,7 +79,7 @@ jobs:
7979

8080
# We tried to use the cache action to cache gradle stuff, but it made tests slower and timeout
8181
- name: Run instrumentation tests
82-
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2
82+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # pin@v2
8383
with:
8484
api-level: 30
8585
target: aosp_atd

.github/workflows/generate-javadocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
./gradlew aggregateJavadocs
2828
- name: Deploy
29-
uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 # [email protected].3
29+
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 # [email protected].4
3030
with:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
BRANCH: gh-pages
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: SDK Size Analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
name: Build and Analyze SDK Size
16+
runs-on: ubuntu-latest
17+
18+
env:
19+
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
20+
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@v5
24+
25+
- name: Setup Java Version
26+
uses: actions/setup-java@v5
27+
with:
28+
distribution: "temurin"
29+
java-version: "17"
30+
31+
# Workaround for https://github.com/gradle/actions/issues/21 to use config cache
32+
- name: Cache buildSrc
33+
uses: actions/cache@v4
34+
with:
35+
path: buildSrc/build
36+
key: build-logic-${{ hashFiles('buildSrc/src/**', 'buildSrc/build.gradle.kts','buildSrc/settings.gradle.kts') }}
37+
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2
40+
with:
41+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
42+
43+
- name: Size Analysis
44+
run: ./gradlew :sentry-android-integration-tests:test-app-size:bundleRelease
45+
env:
46+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696

9797
- name: Create AVD and generate snapshot for caching
9898
if: steps.avd-cache.outputs.cache-hit != 'true'
99-
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2
99+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # pin@v2
100100
with:
101101
api-level: ${{ matrix.api-level }}
102102
target: ${{ matrix.target }}
@@ -120,7 +120,7 @@ jobs:
120120
version: ${{env.MAESTRO_VERSION}}
121121

122122
- name: Run tests
123-
uses: reactivecircus/android-emulator-runner@1dcd0090116d15e7c562f8db72807de5e036a4ed # pin@v2.34.0
123+
uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # pin@v2.35.0
124124
with:
125125
api-level: ${{ matrix.api-level }}
126126
target: ${{ matrix.target }}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
-e '/.*"sentry-android-integration-tests:sentry-uitest-android",/d' \
8181
-e '/.*"sentry-android-integration-tests:sentry-uitest-android-critical",/d' \
8282
-e '/.*"sentry-android-integration-tests:test-app-sentry",/d' \
83+
-e '/.*"sentry-android-integration-tests:test-app-size",/d' \
8384
-e '/.*"sentry-samples:sentry-samples-android",/d' \
8485
-e '/.*"sentry-android-replay",/d' \
8586
settings.gradle.kts
@@ -91,6 +92,7 @@ jobs:
9192
-e '/.*"sentry-uitest-android-benchmark",/d' \
9293
-e '/.*"sentry-uitest-android-critical",/d' \
9394
-e '/.*"test-app-sentry",/d' \
95+
-e '/.*"test-app-size",/d' \
9496
-e '/.*"sentry-samples-android",/d' \
9597
build.gradle.kts
9698

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
-e '/.*"sentry-android-integration-tests:sentry-uitest-android",/d' \
8181
-e '/.*"sentry-android-integration-tests:sentry-uitest-android-critical",/d' \
8282
-e '/.*"sentry-android-integration-tests:test-app-sentry",/d' \
83+
-e '/.*"sentry-android-integration-tests:test-app-size",/d' \
8384
-e '/.*"sentry-samples:sentry-samples-android",/d' \
8485
-e '/.*"sentry-android-replay",/d' \
8586
settings.gradle.kts
@@ -91,6 +92,7 @@ jobs:
9192
-e '/.*"sentry-uitest-android-benchmark",/d' \
9293
-e '/.*"sentry-uitest-android-critical",/d' \
9394
-e '/.*"test-app-sentry",/d' \
95+
-e '/.*"test-app-size",/d' \
9496
-e '/.*"sentry-samples-android",/d' \
9597
build.gradle.kts
9698

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
-e '/.*"sentry-android-integration-tests:sentry-uitest-android",/d' \
8181
-e '/.*"sentry-android-integration-tests:sentry-uitest-android-critical",/d' \
8282
-e '/.*"sentry-android-integration-tests:test-app-sentry",/d' \
83+
-e '/.*"sentry-android-integration-tests:test-app-size",/d' \
8384
-e '/.*"sentry-samples:sentry-samples-android",/d' \
8485
-e '/.*"sentry-android-replay",/d' \
8586
settings.gradle.kts
@@ -91,6 +92,7 @@ jobs:
9192
-e '/.*"sentry-uitest-android-benchmark",/d' \
9293
-e '/.*"sentry-uitest-android-critical",/d' \
9394
-e '/.*"test-app-sentry",/d' \
95+
-e '/.*"test-app-size",/d' \
9496
-e '/.*"sentry-samples-android",/d' \
9597
build.gradle.kts
9698

0 commit comments

Comments
 (0)