generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make trace graph generic and show ingree events (#2761)
Fixes #2734 We can now show ingress and call events in the trace graph. We can iterate on styling etc. in the future, but this at least gets the events in. Next up will be a trace specific list and page to navigate around traces and drill into events. ![Screenshot 2024-09-20 at 1 06 27 PM](https://github.com/user-attachments/assets/88657349-995f-41b1-a001-8770ed482143) ![Screenshot 2024-09-20 at 12 59 43 PM](https://github.com/user-attachments/assets/5bef61d1-0e8e-4d45-9208-e10578b52d27) ![Screenshot 2024-09-20 at 12 59 57 PM](https://github.com/user-attachments/assets/a8655792-51c3-49a3-abc1-308fc91ce491)
- Loading branch information
1 parent
8f81947
commit e4b9646
Showing
11 changed files
with
217 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
frontend/console/src/api/timeline/use-request-trace-events.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { type CallEvent, EventType, type EventsQuery_Filter, type IngressEvent } from '../../protos/xyz/block/ftl/v1/console/console_pb.ts' | ||
import { eventTypesFilter, requestKeysFilter } from './timeline-filters.ts' | ||
import { useTimeline } from './use-timeline.ts' | ||
|
||
export type TraceEvent = CallEvent | IngressEvent | ||
|
||
export const useRequestTraceEvents = (requestKey?: string, filters: EventsQuery_Filter[] = []) => { | ||
const eventTypes = [EventType.CALL, EventType.INGRESS] | ||
const allFilters = [...filters, requestKeysFilter([requestKey || '']), eventTypesFilter(eventTypes)] | ||
const timelineQuery = useTimeline(true, allFilters, !!requestKey) | ||
|
||
const data = timelineQuery.data?.filter((event) => event.entry.case === 'call' || event.entry.case === 'ingress') ?? [] | ||
return { | ||
...timelineQuery, | ||
data, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.