Skip to content

Commit a29d0f2

Browse files
authored
Merge branch 'main' into feat/reduce-scope-forking-for-reactor
2 parents 0914cbd + 33a08cc commit a29d0f2

File tree

306 files changed

+9749
-3951
lines changed

Some content is hidden

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

306 files changed

+9749
-3951
lines changed

.craft.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ targets:
3434
maven:io.sentry:sentry-apache-http-client-5:
3535
maven:io.sentry:sentry-android:
3636
maven:io.sentry:sentry-android-core:
37+
maven:io.sentry:sentry-android-distribution:
3738
maven:io.sentry:sentry-android-ndk:
3839
maven:io.sentry:sentry-android-timber:
3940
maven:io.sentry:sentry-kotlin-extensions:
@@ -63,3 +64,4 @@ targets:
6364
maven:io.sentry:sentry-apollo-4:
6465
maven:io.sentry:sentry-reactor:
6566
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: 3 additions & 3 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
@@ -94,7 +94,7 @@ jobs:
9494

9595
- name: Upload test results
9696
if: always()
97-
uses: actions/upload-artifact@v4
97+
uses: actions/upload-artifact@v5
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
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Upload test results
5555
if: always()
56-
uses: actions/upload-artifact@v4
56+
uses: actions/upload-artifact@v5
5757
with:
5858
name: test-results-build
5959
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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # pin@v2
39+
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # 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@64d10c13136e1c5bce3e5fbde8d4906eeaafc885 # pin@v2
48+
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # pin@v2

.github/workflows/danger.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: Danger
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, reopened, edited, ready_for_review]
5+
types: [opened, synchronize, reopened, edited, ready_for_review, labeled, unlabeled]
66

77
jobs:
88
danger:
9-
uses: getsentry/github-workflows/.github/workflows/danger.yml@v2
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: getsentry/github-workflows/danger@v3

.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: 5 additions & 5 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@v4
47+
uses: actions/upload-artifact@v5
4848
with:
4949
name: ${{env.APK_ARTIFACT_NAME}}
5050
path: "${{env.BASE_PATH}}/${{env.BUILD_PATH}}/${{env.APK_NAME}}"
@@ -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 }}
@@ -110,7 +110,7 @@ jobs:
110110
script: echo "Generated AVD snapshot for caching."
111111

112112
- name: Download APK artifact
113-
uses: actions/download-artifact@v5
113+
uses: actions/download-artifact@v6
114114
with:
115115
name: ${{env.APK_ARTIFACT_NAME}}
116116

@@ -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 }}
@@ -137,7 +137,7 @@ jobs:
137137
138138
- name: Upload Maestro test results
139139
if: failure()
140-
uses: actions/upload-artifact@v4
140+
uses: actions/upload-artifact@v5
141141
with:
142142
name: maestro-logs
143143
path: "${{env.BASE_PATH}}/maestro-logs"

0 commit comments

Comments
 (0)