Skip to content

Commit 61bfdc7

Browse files
committed
Add code sample to CHANGELOG
1 parent d96f817 commit 61bfdc7

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

CHANGELOG.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,49 @@
22

33
## Unreleased
44

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+
<details>
12+
<summary>Java</summary>
13+
14+
```java
15+
// Make sure you disable the auto init via manifest meta-data: io.sentry.auto-init=false
16+
SentryAndroid.init(
17+
this,
18+
options -> {
19+
options.getSessionReplay().setNetworkDetailAllowUrls(new String[] {".*"});
20+
options.getSessionReplay().setNetworkDetailDenyUrls(new String[] {".*deny.*"});
21+
options.getSessionReplay().setNetworkRequestHeaders(
22+
Arrays.asList("Authorization", "X-Custom-Header", "X-Test-Request"));
23+
options.getSessionReplay().setNetworkResponseHeaders(
24+
Arrays.asList("X-Response-Time", "X-Cache-Status", "X-Test-Response"));
25+
});
26+
```
27+
28+
</details>
29+
30+
<details>
31+
<summary>Kotlin</summary>
32+
33+
```java
34+
// Make sure you disable the auto init via manifest meta-data: io.sentry.auto-init=false
35+
SentryAndroid.init(
36+
this,
37+
options -> {
38+
options.sessionReplay.networkDetailAllowUrls = arrayof".*");
39+
options.sessionReplay.networkDetailDenyUrls = arrayof(".*deny.*");
40+
options.sessionReplay.networkRequestHeaders = listof("Authorization", "X-Custom-Header", "X-Test-Request")
41+
options.sessionReplay.networkResponseHeaders = listOf("X-Response-Time", "X-Cache-Status", "X-Test-Response");
42+
});
43+
```
44+
45+
</details>
46+
47+
548
### Improvements
649

750
- Avoid forking `rootScopes` for Reactor if current thread has `NoOpScopes` ([#4793](https://github.com/getsentry/sentry-java/pull/4793))
@@ -17,10 +60,6 @@
1760

1861
### Features
1962

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)
2463
- Implement OpenFeature Integration that tracks Feature Flag evaluations ([#4910](https://github.com/getsentry/sentry-java/pull/4910))
2564
- To make use of it, add the `sentry-openfeature` dependency and register the the hook using: `openFeatureApiInstance.addHooks(new SentryOpenFeatureHook());`
2665
- Implement LaunchDarkly Integrations that track Feature Flag evaluations ([#4917](https://github.com/getsentry/sentry-java/pull/4917))

0 commit comments

Comments
 (0)