Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(integrations): Ensure HttpClient integration works with Axios #7714

Merged
merged 4 commits into from Apr 4, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Apr 3, 2023

This updates the HttpClient integration to use the "regular" instrumentation handling, ensuring this works with Axios.

This also adds request_headers to the xhr info (which we'll also need for replay).

It also ensures that we always correctly get the method/url from fetch options, even when they are other valid objects.

Closes #7615

@mydea mydea requested review from lforst and Lms24 April 3, 2023 13:09
@mydea mydea self-assigned this Apr 3, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.77 KB (+0.55% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 64.88 KB (+0.56% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.28 KB (+0.44% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 57.2 KB (+0.55% 🔺)
@sentry/browser - Webpack (gzipped + minified) 21.63 KB (+0.3% 🔺)
@sentry/browser - Webpack (minified) 72.41 KB (+0.42% 🔺)
@sentry/react - Webpack (gzipped + minified) 21.65 KB (+0.29% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 52.07 KB (+0.15% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.36 KB (+0.36% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.53 KB (+0.31% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.87 KB (+0.21% 🔺)
@sentry/replay - Webpack (gzipped + minified) 38.86 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 63.58 KB (+0.14% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 56.62 KB (+0.16% 🔺)

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

This streamlines the integration to use the general fetch/xhr instrumentation, instead of adding it's own.

This also adds `request_headers` to the xhr info (which we'll also need for replay). 

It also ensures that we always correctly get the method/url from fetch options, even when they are other valid objects.
@mydea mydea merged commit 01d7c5c into develop Apr 4, 2023
58 checks passed
@mydea mydea deleted the fn/httpclient-axios branch April 4, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HttpClient integration does not capture Axios requests
3 participants