Skip to content

Commit 2956dc0

Browse files
committed
rename to getReplayId
1 parent 5edf92b commit 2956dc0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/replay/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ A session starts when the Session Replay SDK is first loaded and initialized. Th
140140
141141
### Accessing the Replay Session ID
142142
143-
You can get the ID of the currently running session via `replay.getSessionId()`.
143+
You can get the ID of the currently running session via `replay.getReplayId()`.
144144
This will return `undefined` if no session is ongoing.
145145
146146
### Replay Captures Only on Errors

packages/replay/src/integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
229229
/**
230230
* Get the current session ID.
231231
*/
232-
public getSessionId(): string | undefined {
232+
public getReplayId(): string | undefined {
233233
if (!this._replay || !this._replay.isEnabled()) {
234234
return;
235235
}

packages/replay/test/integration/getSessionId.test.ts renamed to packages/replay/test/integration/getReplayId.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useFakeTimers } from '../utils/use-fake-timers';
33

44
useFakeTimers();
55

6-
describe('Integration | getSessionId', () => {
6+
describe('Integration | getReplayId', () => {
77
afterEach(() => {
88
jest.clearAllMocks();
99
});
@@ -15,12 +15,12 @@ describe('Integration | getSessionId', () => {
1515
},
1616
});
1717

18-
expect(integration.getSessionId()).toBeDefined();
19-
expect(integration.getSessionId()).toEqual(replay.session?.id);
18+
expect(integration.getReplayId()).toBeDefined();
19+
expect(integration.getReplayId()).toEqual(replay.session?.id);
2020

2121
// When stopped, it is undefined
2222
integration.stop();
2323

24-
expect(integration.getSessionId()).toBeUndefined();
24+
expect(integration.getReplayId()).toBeUndefined();
2525
});
2626
});

0 commit comments

Comments
 (0)