Skip to content

Overview ​

httpContextIntegration stamps two contexts onto every event right before it's sent:

  • request.url — window.location.href at the moment of the event.
  • request.referrer — document.referrer.

The values are read per event rather than once at startup, so in a single-page app each event carries the URL the user was actually on when it happened, not the one the app was loaded from. If you've already set either context yourself, your value is kept.

Usage ​

ts
import { use } from '@buglapse/browser'
import { httpContextIntegration } from '@buglapse/browser/integrations'

use(httpContextIntegration())

The integration takes no options.