mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
Show custom actions in session replays (#127)
Co-authored-by: Warren <5959690+wrn14897@users.noreply.github.com>
This commit is contained in:
parent
778492123c
commit
242d8cc09f
3 changed files with 16 additions and 2 deletions
5
.changeset/twelve-flowers-complain.md
Normal file
5
.changeset/twelve-flowers-complain.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@hyperdx/app': patch
|
||||
---
|
||||
|
||||
Show custom actions in Session Replay events panel
|
||||
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export function useSessionEvents({
|
|||
'location.href',
|
||||
'span_name',
|
||||
'component',
|
||||
'otel.library.name',
|
||||
],
|
||||
order: null,
|
||||
limit: 4000,
|
||||
|
|
|
|||
Loading…
Reference in a new issue