Skip to content

Commit 1de6b99

Browse files
committed
changelog
1 parent a9d3071 commit 1de6b99

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@
66

77
- feat(core): add Response context ([#874](https://github.com/getsentry/sentry-rust/pull/874)) by @lcian
88
- The `Response` context can now be attached to events, to include information about HTTP responses such as headers, cookies and status code.
9+
- Example:
10+
```rust
11+
let mut event = Event::new();
12+
let response = ResponseContext {
13+
cookies: Some(r#""csrftoken": "1234567""#.to_owned()),
14+
headers: Some(headers_map),
15+
status_code: Some(500),
16+
body_size: Some(15),
17+
data: Some("Invalid request"),
18+
};
19+
event
20+
.contexts
21+
.insert("response".to_owned(), response.into());
22+
```
923

1024
## 0.42.0
1125

0 commit comments

Comments
 (0)