| 37 | * Use this integration in combination with `TraceService` |
| 38 | */ |
| 39 | export function browserTracingIntegration( |
| 40 | options: Parameters<typeof originalBrowserTracingIntegration>[0] = {}, |
| 41 | ): Integration { |
| 42 | // If the user opts out to set this up, we just don't initialize this. |
| 43 | // That way, the TraceService will not actually do anything, functionally disabling this. |
| 44 | if (options.instrumentNavigation !== false) { |
| 45 | instrumentationInitialized = true; |
| 46 | } |
| 47 | |
| 48 | return originalBrowserTracingIntegration({ |
| 49 | ...options, |
| 50 | instrumentNavigation: false, |
| 51 | }); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * This function is extracted to make unit testing easier. |