Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 512 Bytes

File metadata and controls

18 lines (16 loc) · 512 Bytes

For example:

  • A frontend application is served from example.com.
  • A backend service is served from api.example.com.
  • The frontend application makes API calls to the backend.
  • Set the tracePropagationTargets option to ['api.example.com'].
  • Now outgoing XHR/fetch requests to api.example.com will get the sentry-trace header attached.
Sentry.init({
  // ...
  integrations: [
    new Sentry.BrowserTracing({
      tracePropagationTargets: ["api.example.com"],
    }),
  ],
});