We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9d3071 commit 1de6b99Copy full SHA for 1de6b99
CHANGELOG.md
@@ -6,6 +6,20 @@
6
7
- feat(core): add Response context ([#874](https://github.com/getsentry/sentry-rust/pull/874)) by @lcian
8
- 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
+ ```
23
24
## 0.42.0
25
0 commit comments