Skip to content

HttpClient integration does not capture Axios requests #7615

Description

@hckhanh

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/react

SDK Version

7.45.0

Framework Version

React 18.2

Link to Sentry event

No response

SDK Setup

import{ErrorBoundary,Replay,initasinitSentry,Integrations,}from'@sentry/react'import{BrowserTracing}from'@sentry/tracing'import{HttpClientasHttpClientIntegration,DebugasDebugIntegration,}from'@sentry/integrations'initSentry({dsn: __SENTRY_DSN__,release: __SENTRY_RELEASE__,dist: __SENTRY_DIST__,environment: import.meta.env.MODE,// debug: true,enabled: true,integrations: [newBrowserTracing(),// new Integrations.newReplay({maskAllText: false,maskAllInputs: false,blockAllMedia: false,}),newHttpClientIntegration({// failedRequestStatusCodes: [401],// failedRequestTargets: ['http://localhost:3005'],}),newDebugIntegration({// // trigger DevTools debugger instead of using console.log// debugger: true,// // stringify event before passing it to console.log// stringify: boolean;}),],tracesSampleRate: 1,replaysSessionSampleRate: 1,replaysOnErrorSampleRate: 1,})

Steps to Reproduce

When I add HttpClient, it cannot report XHR request. I am using Axios v1

Expected Result

it will report XHR requests

Actual Result

It don't report any XHR requests. Even though the exception pointed directly to _wrapXHR function of Sentry

image

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions