|
2 | 2 |
|
3 | 3 | ## Unreleased |
4 | 4 |
|
| 5 | +### Features |
| 6 | + |
| 7 | +- Add option to capture additional OkHttp network request/response details in session replays ([#4919](https://github.com/getsentry/sentry-java/pull/4919)) |
| 8 | + - Depends on `SentryOkHttpInterceptor` to intercept the request and extract request/response bodies. |
| 9 | + - To enable, add url regexes via the `io.sentry.session-replay.network-detail-allow-urls` metadata tag in AndroidManifest ([code sample](https://github.com/getsentry/sentry-java/blob/b03edbb1b0d8b871c62a09bc02cbd8a4e1f6fea1/sentry-samples/sentry-samples-android/src/main/AndroidManifest.xml#L196-L205)) |
| 10 | + - Or you can manually specify SentryReplayOptions via `SentryAndroid#init`: |
| 11 | +_(Make sure you disable the auto init via manifest meta-data: io.sentry.auto-init=false)_ |
| 12 | + |
| 13 | +<details> |
| 14 | + <summary>Kotlin</summary> |
| 15 | + |
| 16 | +```kotlin |
| 17 | +SentryAndroid.init( |
| 18 | + this, |
| 19 | + options -> { |
| 20 | + // options.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0" |
| 21 | + // options.sessionReplay.sessionSampleRate = 1.0 |
| 22 | + // options.sessionReplay.onErrorSampleRate = 1.0 |
| 23 | + // .. |
| 24 | + |
| 25 | + options.sessionReplay.networkDetailAllowUrls = arrayOf(".*") |
| 26 | + options.sessionReplay.networkDetailDenyUrls = arrayOf(".*deny.*") |
| 27 | + options.sessionReplay.networkRequestHeaders = listOf("Authorization", "X-Custom-Header", "X-Test-Request") |
| 28 | + options.sessionReplay.networkResponseHeaders = listOf("X-Response-Time", "X-Cache-Status", "X-Test-Response") |
| 29 | + }); |
| 30 | +``` |
| 31 | + |
| 32 | +</details> |
| 33 | + |
| 34 | +<details> |
| 35 | + <summary>Java</summary> |
| 36 | + |
| 37 | +```java |
| 38 | +SentryAndroid.init( |
| 39 | + this, |
| 40 | + options -> { |
| 41 | + options.getSessionReplay().setNetworkDetailAllowUrls(new String[] {".*"}); |
| 42 | + options.getSessionReplay().setNetworkDetailDenyUrls(new String[] {".*deny.*"}); |
| 43 | + options.getSessionReplay().setNetworkRequestHeaders( |
| 44 | + Arrays.asList("Authorization", "X-Custom-Header", "X-Test-Request")); |
| 45 | + options.getSessionReplay().setNetworkResponseHeaders( |
| 46 | + Arrays.asList("X-Response-Time", "X-Cache-Status", "X-Test-Response")); |
| 47 | + }); |
| 48 | + |
| 49 | +``` |
| 50 | + |
| 51 | +</details> |
| 52 | + |
| 53 | + |
5 | 54 | ### Improvements |
6 | 55 |
|
7 | 56 | - Avoid forking `rootScopes` for Reactor if current thread has `NoOpScopes` ([#4793](https://github.com/getsentry/sentry-java/pull/4793)) |
|
17 | 66 |
|
18 | 67 | ### Features |
19 | 68 |
|
20 | | -- Add option to capture additional network details for session replays (OkHttp) ([#4919](https://github.com/getsentry/sentry-java/pull/4919) |
21 | | - - Depends on `SentryOkHttpInterceptor` to intercept the request and extract request/response bodies. |
22 | | - - To enable, configure your sentry SDK using the "io.sentry.session-replay.network-*" options via [manifest](https://github.com/getsentry/sentry-java/blob/b03edbb1b0d8b871c62a09bc02cbd8a4e1f6fea1/sentry-samples/sentry-samples-android/src/main/AndroidManifest.xml#L196-L205) |
23 | | - - Or manually specify SentryReplayOptions via [SentryAndroid#init](https://github.com/getsentry/sentry-java/blob/c83e427e8baca17098f882f8b45fc7c5a80c1d8c/sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MyApplication.java#L16-L28) |
24 | 69 | - Implement OpenFeature Integration that tracks Feature Flag evaluations ([#4910](https://github.com/getsentry/sentry-java/pull/4910)) |
25 | 70 | - To make use of it, add the `sentry-openfeature` dependency and register the the hook using: `openFeatureApiInstance.addHooks(new SentryOpenFeatureHook());` |
26 | 71 | - Implement LaunchDarkly Integrations that track Feature Flag evaluations ([#4917](https://github.com/getsentry/sentry-java/pull/4917)) |
|
0 commit comments