Skip to content

Commit 9fe4c7d

Browse files
committed
fix small issues
1 parent 038edda commit 9fe4c7d

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

dev-packages/browser-integration-tests/suites/profiling/manualMode/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ sentryTest('sends profile_chunk envelopes in manual mode', async ({ page, getLoc
8787
isChunkFormat: true,
8888
});
8989

90-
// does not contain fibonacci3 (called during unprofiled part)
91-
const functionNames2 = envelopeItemPayload1.profile.frames.map(frame => frame.function).filter(name => name !== '');
92-
expect(functionNames2).toEqual(expect.not.arrayContaining(['fibonacci3']));
90+
// does not contain notProfiledFib (called during unprofiled part)
91+
const functionNames2 = envelopeItemPayload2.profile.frames.map(frame => frame.function).filter(name => name !== '');
92+
expect(functionNames2).toEqual(expect.not.arrayContaining(['notProfiledFib']));
9393
});

packages/browser/src/profiling/UIProfiler.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class UIProfiler implements ContinuousProfiler<Client> {
115115
}
116116

117117
if (!this._isRunning) {
118-
DEBUG_BUILD && debug.warn('[Profiling] Profile session is already running, `uiProfiler.stop()` is a no-op.');
118+
DEBUG_BUILD && debug.warn('[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.');
119119
return;
120120
}
121121

@@ -159,9 +159,6 @@ export class UIProfiler implements ContinuousProfiler<Client> {
159159
// Expose profiler_id to match root spans with profiles
160160
getGlobalScope().setContext('profile', { profiler_id: this._profilerId });
161161

162-
// Expose profiler_id to match root spans with profiles
163-
getGlobalScope().setContext('profile', { profiler_id: this._profilerId });
164-
165162
this._startProfilerInstance();
166163

167164
if (!this._profiler) {

packages/browser/test/profiling/UIProfiler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ describe('Browser Profiling v2 manual lifecycle', () => {
708708

709709
expect(stop).toHaveBeenCalledTimes(1);
710710
expect(debugWarnSpy).toHaveBeenCalledWith(
711-
'[Profiling] Profile session is already running, `uiProfiler.stop()` is a no-op.',
711+
'[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.',
712712
);
713713
});
714714

0 commit comments

Comments
 (0)