HttpContext for Vue

Attaches the page URL and the user agent and referrer headers to the event. (default)

Import name: Sentry.httpContextIntegration

This integration is enabled by default. If you'd like to modify your default integrations, read this.

This integration attaches the current page URL and the User-Agent and Referer headers to events and spans. Sentry uses the User-Agent header to tag events with browser, OS, and device information.

Copied
Sentry.init({
  integrations: [Sentry.httpContextIntegration()],
});

This integration respects the dataCollection option in your root Sentry.init config:

  • dataCollection.httpHeaders.request controls the User-Agent and Referer headers. If you disable request header collection, the SDK doesn't send these headers, and events won't include the browser, OS, and device information derived from User-Agent.
  • dataCollection.urlQueryParams controls the query parameters in the page URL and the referrer.
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").