Uh oh!
There was an error while loading. Please reload this page.
feat(integrations): Add HTTPClient integration - #6500
Conversation
size-limit report 📦
|
9f40a03 to
0eb8748Compare0eb8748 to
3bbc564Compare
lforst
left a comment
There was a problem hiding this comment.
First pass. Already looks very good to me!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lforst
left a comment
There was a problem hiding this comment.
One more pass, after this I think we're good :)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
smeubank
commented
Jan 4, 2023
we need to discuss this bundle size bump and why it is so much on the CDN, if we can get a strategy to reduce it |
lforst
commented
Jan 4, 2023
@onurtemizkan I completely missed the bundle size impact. Can we move this integration into the |
523ede7 to
e8fb9cdCompare
Resolves: #6282
Implemented
HTTPClientintegration for@sentry/browserSDK.Implementation Guide
Response Context Spec
This integration intercepts Fetch API and XHR requests to get the response (and request) information, and creates / captures events if there is a failed (according to the user's configuration) request.
Summary:
XMLHttpRequestandfetchutilities, which can also be wrapped by other Sentry - non-Sentry utilities before or after it.cookieandheadercollection for bothrequests andresponses is the best effort. Certain headers may be missing here in the integration-created event, even if they exist in the original request / response.body_sizeis calculated only if theContent-Lengthheader is available in response headers.fetch-specific Notes:bodyinsideevent.requestobject is not implemented here. It's not available at all for XHR requests, but here it's possible. Size limits and when to leave it out should be discussed, if we are including it.Requestobject from arguments of thefetchfunction. Not sure if there are any concerns about performance, but this is the most straightforward way I could find to replicate the originalrequestobject.requestand nativeresponseobjects are added to the event ashints, as described in the spec.XHR-specific Notes:XHRrequests. We're interceptingsetRequestHeadermethod, which is only used for user or library-defined headers. And settingCookiewithsetRequestHeaderis not allowed in browsers. due to security reasons.requestandresponseobjects forXHRrequests, so events created from failed XHR requests, do not contain hints.