We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0bc817 commit 13b59bbCopy full SHA for 13b59bb
src/lib/client/posthog/utils/index.ts
@@ -0,0 +1,5 @@
1
+import { posthog } from '../client';
2
+
3
+export function getSessionId(): string | undefined {
4
+ return posthog?.get_session_id();
5
+}
src/lib/client/sentry/utils/index.ts
@@ -1,4 +1,5 @@
import { posthog } from '$lib/client/posthog';
+import { getSessionId } from '$lib/client/posthog/utils';
import { sentry } from '$lib/shared/sentry';
import type { Integration } from '@sentry/types';
@@ -17,6 +18,6 @@ export function getClientSentryIntegrations(
17
18
19
export function setClientPosthogSessionId(): void {
20
if (posthog) {
- sentry?.setTag(POSTHOG_SESSION_ID_TAG, posthog.get_session_id());
21
+ sentry?.setTag(POSTHOG_SESSION_ID_TAG, getSessionId() as string);
22
}
23
0 commit comments