* Starts the Sentry UI profiler. * This mode is exclusive with the transaction profiler and will only work if the profilesSampleRate is set to a falsy value. * In UI profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling
()
| 8 | * In UI profiling mode, the profiler will keep reporting profile chunks to Sentry until it is stopped, which allows for continuous profiling of the application. |
| 9 | */ |
| 10 | function startProfiler(): void { |
| 11 | const client = getClient(); |
| 12 | if (!client) { |
| 13 | DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started'); |
| 14 | return; |
| 15 | } |
| 16 | |
| 17 | const integration = client.getIntegrationByName('BrowserProfiling'); |
| 18 | |
| 19 | if (!integration) { |
| 20 | DEBUG_BUILD && debug.warn('BrowserProfiling integration is not available'); |
| 21 | return; |
| 22 | } |
| 23 | |
| 24 | client.emit('startUIProfiler'); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Stops the Sentry UI profiler. |
nothing calls this directly
no test coverage detected