Show custom actions in session replays (#127)

Co-authored-by: Warren <5959690+wrn14897@users.noreply.github.com>
This commit is contained in:
Mike Shi 2023-11-28 00:13:43 -08:00 committed by GitHub
parent 778492123c
commit 242d8cc09f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@hyperdx/app': patch
---
Show custom actions in Session Replay events panel

View file

@ -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],

View file

@ -38,6 +38,7 @@ export function useSessionEvents({
'location.href',
'span_name',
'component',
'otel.library.name',
],
order: null,
limit: 4000,