diff --git a/.changeset/twelve-flowers-complain.md b/.changeset/twelve-flowers-complain.md new file mode 100644 index 00000000..c7847dbc --- /dev/null +++ b/.changeset/twelve-flowers-complain.md @@ -0,0 +1,5 @@ +--- +'@hyperdx/app': patch +--- + +Show custom actions in Session Replay events panel diff --git a/packages/app/src/SessionSubpanel.tsx b/packages/app/src/SessionSubpanel.tsx index eba9f1a4..aa27dd9d 100644 --- a/packages/app/src/SessionSubpanel.tsx +++ b/packages/app/src/SessionSubpanel.tsx @@ -55,8 +55,10 @@ function SessionEventList({ const component = event['component']; const spanName = event['span_name']; const locationHref = event['location.href']; + const otelLibraryName = event['otel.library.name']; const shortLocationHref = getShortUrl(locationHref); + const isCustomEvent = otelLibraryName === 'custom-action'; const isNavigation = spanName === 'routeChange' || spanName === 'documentLoad'; @@ -73,6 +75,8 @@ function SessionEventList({ ? 'navigation' : isNetworkRequest ? 'network' + : isCustomEvent + ? 'custom' : spanName === 'intercom.onShow' ? 'chat' : 'log', @@ -84,6 +88,8 @@ function SessionEventList({ ? 'console.error' : spanName === 'intercom.onShow' ? 'Intercom Chat Opened' + : isCustomEvent + ? spanName : component === 'console' ? spanName : 'console.error', @@ -190,6 +196,8 @@ function SessionEventList({ ? 'arrow-left-right' : row.eventSource === 'chat' ? 'chat-dots' + : row.eventSource === 'custom' + ? 'cursor' : 'terminal' }`} /> @@ -413,7 +421,7 @@ export default function SessionSubpanel({ const playBarEventsConfig = useMemo( () => ({ - where: `rum_session_id:"${rumSessionId}" (http.status_code:>299 OR component:"error" OR span_name:"routeChange" OR span_name:"documentLoad" OR span_name:"intercom.onShow") ${searchedQuery}`, + where: `rum_session_id:"${rumSessionId}" (http.status_code:>299 OR component:"error" OR span_name:"routeChange" OR span_name:"documentLoad" OR span_name:"intercom.onShow" OR otel.library.name:"custom-action") ${searchedQuery}`, dateRange: [start, end] as [Date, Date], }), [rumSessionId, start, end, searchedQuery], @@ -426,7 +434,7 @@ export default function SessionSubpanel({ displayedTab === 'events' ? '0' : '299' } OR component:"error" ${ displayedTab === 'events' ? 'OR component:"console"' : '' - } OR span_name:"routeChange" OR span_name:"documentLoad" OR span_name:"intercom.onShow") ${searchedQuery}`, + } OR span_name:"routeChange" OR span_name:"documentLoad" OR span_name:"intercom.onShow" OR otel.library.name:"custom-action") ${searchedQuery}`, dateRange: [start, end] as [Date, Date], }), [rumSessionId, start, end, displayedTab, searchedQuery], diff --git a/packages/app/src/sessionUtils.tsx b/packages/app/src/sessionUtils.tsx index 8ae7f207..77bde280 100644 --- a/packages/app/src/sessionUtils.tsx +++ b/packages/app/src/sessionUtils.tsx @@ -38,6 +38,7 @@ export function useSessionEvents({ 'location.href', 'span_name', 'component', + 'otel.library.name', ], order: null, limit: 4000,