diff --git a/packages/browser/src/profiling/lifecycleMode/traceLifecycleProfiler.ts b/packages/browser/src/profiling/UIProfiler.ts similarity index 98% rename from packages/browser/src/profiling/lifecycleMode/traceLifecycleProfiler.ts rename to packages/browser/src/profiling/UIProfiler.ts index 3ce773fe01ff..fb7cd022ac7f 100644 --- a/packages/browser/src/profiling/lifecycleMode/traceLifecycleProfiler.ts +++ b/packages/browser/src/profiling/UIProfiler.ts @@ -9,9 +9,9 @@ import { getSdkMetadataForEnvelopeHeader, uuid4, } from '@sentry/core'; -import { DEBUG_BUILD } from '../../debug-build'; -import type { JSSelfProfiler } from '../jsSelfProfiling'; -import { createProfileChunkPayload, startJSSelfProfile, validateProfileChunk } from '../utils'; +import { DEBUG_BUILD } from './../debug-build'; +import type { JSSelfProfiler } from './jsSelfProfiling'; +import { createProfileChunkPayload, startJSSelfProfile, validateProfileChunk } from './utils'; const CHUNK_INTERVAL_MS = 60_000; // 1 minute // Maximum length for trace lifecycle profiling per root span (e.g. if spanEnd never fires) @@ -27,7 +27,7 @@ const MAX_ROOT_SPAN_PROFILE_MS = 300_000; // 5 minutes * - there are no more sampled root spans, or * - the 60s chunk timer elapses while profiling is running. */ -export class BrowserTraceLifecycleProfiler { +export class UIProfiler { private _client: Client | undefined; private _profiler: JSSelfProfiler | undefined; private _chunkTimer: ReturnType | undefined; diff --git a/packages/browser/src/profiling/integration.ts b/packages/browser/src/profiling/integration.ts index 415282698d45..7cd1886e636d 100644 --- a/packages/browser/src/profiling/integration.ts +++ b/packages/browser/src/profiling/integration.ts @@ -3,8 +3,8 @@ import { debug, defineIntegration, getActiveSpan, getRootSpan, hasSpansEnabled } import type { BrowserOptions } from '../client'; import { DEBUG_BUILD } from '../debug-build'; import { WINDOW } from '../helpers'; -import { BrowserTraceLifecycleProfiler } from './lifecycleMode/traceLifecycleProfiler'; import { startProfileForSpan } from './startProfileForSpan'; +import { UIProfiler } from './UIProfiler'; import type { ProfiledEvent } from './utils'; import { addProfilesToEnvelope, @@ -65,7 +65,7 @@ const _browserProfilingIntegration = (() => { return; } - const traceLifecycleProfiler = new BrowserTraceLifecycleProfiler(); + const traceLifecycleProfiler = new UIProfiler(); traceLifecycleProfiler.initialize(client, sessionSampled); // If there is an active, sampled root span already, notify the profiler diff --git a/packages/browser/test/profiling/traceLifecycleProfiler.test.ts b/packages/browser/test/profiling/UIProfiler.test.ts similarity index 100% rename from packages/browser/test/profiling/traceLifecycleProfiler.test.ts rename to packages/browser/test/profiling/UIProfiler.test.ts