MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / stopProfiler

Function stopProfiler

packages/browser/src/profiling/index.ts:31–45  ·  view source on GitHub ↗

* Stops the Sentry UI profiler. * Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.

()

Source from the content-addressed store, hash-verified

29 * Calls to stop will stop the profiler and flush the currently collected profile data to Sentry.
30 */
31function stopProfiler(): void {
32 const client = getClient();
33 if (!client) {
34 DEBUG_BUILD && debug.warn('No Sentry client available, profiling is not started');
35 return;
36 }
37
38 const integration = client.getIntegrationByName('BrowserProfiling');
39 if (!integration) {
40 DEBUG_BUILD && debug.warn('ProfilingIntegration is not available');
41 return;
42 }
43
44 client.emit('stopUIProfiler');
45}
46
47/**
48 * Profiler namespace for controlling the JS profiler in 'manual' mode.

Callers

nothing calls this directly

Calls 4

getClientFunction · 0.90
warnMethod · 0.65
emitMethod · 0.65
getIntegrationByNameMethod · 0.45

Tested by

no test coverage detected