Skip to content

Commit e72af42

Browse files
authored
Merge branch 'main' into feat/profiling-remove-vendored-code
2 parents ddac023 + ab8a72d commit e72af42

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.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@4e94bd11f71e507f7f87df81788dff88d1dacbfb # 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@4e94bd11f71e507f7f87df81788dff88d1dacbfb # pin@v2
48+
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # pin@v2

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
- Fallback to distinct-id as user.id logging attribute when user is not set ([#4847](https://github.com/getsentry/sentry-java/pull/4847))
1212
- Report Timber.tag() as `timber.tag` log attribute ([#4845](https://github.com/getsentry/sentry-java/pull/4845))
13+
- Session Replay: Add screenshot strategy serialization to RRWeb events ([#4851](https://github.com/getsentry/sentry-java/pull/4851))
1314

1415
## 8.25.0
1516

sentry/src/main/java/io/sentry/rrweb/RRWebOptionsEvent.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import io.sentry.JsonUnknown;
77
import io.sentry.ObjectReader;
88
import io.sentry.ObjectWriter;
9+
import io.sentry.ScreenshotStrategyType;
910
import io.sentry.SentryOptions;
1011
import io.sentry.SentryReplayOptions;
1112
import io.sentry.protocol.SdkVersion;
@@ -52,6 +53,12 @@ public RRWebOptionsEvent(final @NotNull SentryOptions options) {
5253
optionsPayload.put("quality", replayOptions.getQuality().serializedName());
5354
optionsPayload.put("maskedViewClasses", replayOptions.getMaskViewClasses());
5455
optionsPayload.put("unmaskedViewClasses", replayOptions.getUnmaskViewClasses());
56+
57+
final String screenshotStrategy =
58+
(replayOptions.getScreenshotStrategy() == ScreenshotStrategyType.PIXEL_COPY)
59+
? "pixelCopy"
60+
: "canvas";
61+
optionsPayload.put("screenshotStrategy", screenshotStrategy);
5562
}
5663

5764
@NotNull

sentry/src/test/resources/json/rrweb_options_event.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"maskedViewClasses": [],
1313
"nativeSdkName": "sentry.java",
1414
"sessionSampleRate": 0.5,
15-
"quality": "low"
15+
"quality": "low",
16+
"screenshotStrategy": "pixelCopy"
1617
}
1718
}
1819
}

0 commit comments

Comments
 (0)