You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR cleans up the behavior of `requestDataIntegration`. For this,
there are a bunch of parts that come together:
1. Removed the `addNormalizedRequestDataToEvent` export, this does not
really do much, you can just directly add the data to the event.
2. Removed the `RequestDataIntegrationOptions` type
3. Stops setting `request` on SDK processing metadata, now only relying
on `normalizedRequest`
4. Streamlined code related to this, taking it out of `utils-hoist`.
Now, all the code related directly to the requestDataIntegration is in
that file, while the more general utils are in core/src/utils/request.ts
5. Also moved the cookie & getClientIpAddress utils out of utils-hoist
6. Added tests for the request utils, we did not have any unit tests
there...
7. Streamlined the header extraction to avoid debug logs and simply
try-catch there normally
8. Streamlined the request extraction to avoid weird urls if no host is
found.
Closes#14297
Copy file name to clipboardExpand all lines: docs/migration/v8-to-v9.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -173,8 +173,9 @@ Sentry.init({
173
173
- The `getDomElement` method has been removed. There is no replacement.
174
174
- The `memoBuilder` method has been removed. There is no replacement.
175
175
- The `extractRequestData` method has been removed. Manually extract relevant data off request instead.
176
-
- The `addRequestDataToEvent` method has been removed. Use `addNormalizedRequestDataToEvent` instead.
176
+
- The `addRequestDataToEvent` method has been removed. Use `httpRequestToRequestData` instead and put the resulting object directly on `event.request`.
177
177
- The `extractPathForTransaction` method has been removed. There is no replacement.
178
+
- The `addNormalizedRequestDataToEvent` method has been removed. Use `httpRequestToRequestData` instead and put the resulting object directly on `event.request`.
178
179
179
180
#### Other/Internal Changes
180
181
@@ -254,6 +255,7 @@ Since v9, the types have been merged into `@sentry/core`, which removed some of
254
255
- The `samplingContext.request` attribute in the `tracesSampler` has been removed. Use `samplingContext.normalizedRequest` instead. Note that the type of `normalizedRequest` differs from `request`.
255
256
-`Client` now always expects the `BaseClient` class - there is no more abstract `Client` that can be implemented! Any `Client` class has to extend from `BaseClient`.
256
257
-`ReportDialogOptions` now extends `Record<string, unknown>` instead of `Record<string, any>` - this should not affect most users.
258
+
- The `RequestDataIntegrationOptions` type has been removed. There is no replacement.
257
259
258
260
# No Version Support Timeline
259
261
@@ -307,7 +309,7 @@ The Sentry metrics beta has ended and the metrics API has been removed from the
307
309
- Deprecated `TransactionNamingScheme` type.
308
310
- Deprecated `validSeverityLevels`. Will not be replaced.
309
311
- Deprecated `urlEncode`. No replacements.
310
-
- Deprecated `addRequestDataToEvent`. Use `addNormalizedRequestDataToEvent` instead.
312
+
- Deprecated `addRequestDataToEvent`. Use `httpRequestToRequestData` instead and put the resulting object directly on `event.request`.
311
313
- Deprecated `extractRequestData`. Instead manually extract relevant data off request.
0 commit comments