Skip to content

Commit 9d1fa42

Browse files
authored
improve gonfalon member email reporting (#101)
## Summary Report the LD SDK context `member.email` when available to as the o11y identifier. ## How did you test this change? <img width="1652" alt="Screenshot 2025-07-01 at 17 44 16" src="https://github.com/user-attachments/assets/4199b08c-7948-4e6d-87d1-5d4bb250a8d9" /> <!-- Frontend - Leave a screencast or a screenshot to visually describe the changes. --> ## Are there any deployment considerations? changeset will bump gonfalon session replay sdk ## Does this work require review from our design team? no
1 parent 365fe35 commit 9d1fa42

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.changeset/green-eggs-win.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'highlight.run': patch
3+
'@launchdarkly/session-replay': patch
4+
---
5+
6+
report member.email from context object

e2e/react-router/src/ldclient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const sessionReplaySettings: ConstructorParameters<typeof SessionReplay>[0] = {
2424
}
2525

2626
export const client = init(
27-
'5dbc84672a88c108b14dad13',
27+
'548f6741c1efad40031b18ae',
2828
{ key: 'unknown' },
2929
{
3030
// Not including plugins at all would be equivalent to the current LaunchDarkly SDK.

sdk/highlight-run/src/integrations/launchdarkly/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ function isMultiContext(context: any): context is LDMultiKindContext {
7171
// logic for using the memberEmail, when set.
7272
export function getCanonicalKey(context: LDContext) {
7373
if (isMultiContext(context)) {
74-
if (context.user) {
75-
const user = context.user as LDContextCommon
76-
if (user.memberEmail) {
77-
return user.memberEmail
74+
if (context.member) {
75+
const user = context.member as LDContextCommon
76+
if (user.email) {
77+
return user.email
7878
} else {
7979
return user.key
8080
}

0 commit comments

Comments
 (0)