UserTiming for Astro

Capture performance.mark() and performance.measure() entries as browser spans.

Import name: Sentry.userTimingIntegration

The UserTiming integration captures performance.mark() and performance.measure() entries as spans. Use it with BrowserTracing or your framework's routing integration. Timing entries are added to pageload and navigation spans when those spans end.

Before SDK version 11, BrowserTracing captured these entries automatically, without a separate integration.

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

ignore

TypeArray<string | RegExp>
Default[]

Skip timing entries whose names match any string or regular expression in this array. Use this to exclude measurements from third-party code.

Copied
Sentry.userTimingIntegration({
  ignore: ["third-party-mark", /^framework-/],
});
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").