mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-20 10:24:19 +00:00
Feat/jaeger (#243)
* added dummy jaeger json file * added jaeger types file * added dev jaeger endpoint * added jaeger modal with trace visual / information * refactored jaeger logic fixed offsets on short duration spans * refactored into smaller components & added basic scroll bar * removed buttons, added scroll-x, fixed details height and scroll-y * shrunk bar graph to fit view port * slight adjustments * removed ref and now calculate width based on window innerwidth * @media for phone layouts * -fixed details width and padding. -removed scroll.tsx as not needed now -using SpanKind to find parent for now * -reduced truncate size for smaller screens * -root span is now determined from parentSpanId not being found * removed un-needed calls to /getRecentCalls as this was causing a race condition when pcap & jaeger fetching at same time - removed console.log's * wip: add tabs for recent callt tracing * wip: add tabs for recent callt tracing * wip: add tabs for recent callt tracing * fix: review comments * fix: review comments --------- Co-authored-by: ajukes <ajukes@vibecoms.co.uk>
This commit is contained in:
1 parent
414bca4fdc
commit
bfbd66ef5c
14 files changed
+1849
-31
No files matched your search
@@ -69,6 +69,7 @@ import type {
|
||||
LcrCarrierSetEntry,
|
||||
} from "./types";
|
||||
import { StatusCodes } from "./types";
|
||||
import { JaegerRoot } from "./jaeger-types";
|
||||
|
||||
/** Wrap all requests to normalize response handling */
|
||||
const fetchTransport = <Type>(
|
||||
@@ -633,6 +634,14 @@ export const getPcap = (sid: string, sipCallId: string) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const getJaegerTrace = (sid: string, traceId: string) => {
|
||||
return getFetch<JaegerRoot>(
|
||||
import.meta.env.DEV
|
||||
? `${DEV_BASE_URL}/Accounts/${sid}/RecentCalls/trace/${traceId}`
|
||||
: `${API_ACCOUNTS}/${sid}/RecentCalls/trace/${traceId}`
|
||||
);
|
||||
};
|
||||
|
||||
export const getServiceProviderRecentCall = (
|
||||
sid: string,
|
||||
sipCallId: string
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
export interface JaegerRoot {
|
||||
resourceSpans: JaegerResourceSpan[];
|
||||
}
|
||||
|
||||
export interface JaegerResourceSpan {
|
||||
resource: JaegerResource;
|
||||
instrumentationLibrarySpans: InstrumentationLibrarySpan[];
|
||||
}
|
||||
|
||||
export interface JaegerResource {
|
||||
attributes: JaegerAttribute[];
|
||||
}
|
||||
|
||||
export interface InstrumentationLibrarySpan {
|
||||
instrumentationLibrary: InstrumentationLibrary;
|
||||
spans: JaegerSpan[];
|
||||
}
|
||||
|
||||
export interface InstrumentationLibrary {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface JaegerSpan {
|
||||
traceId: string;
|
||||
spanId: string;
|
||||
parentSpanId: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
startTimeUnixNano: number;
|
||||
endTimeUnixNano: number;
|
||||
attributes: JaegerAttribute[];
|
||||
}
|
||||
|
||||
export interface JaegerAttribute {
|
||||
key: string;
|
||||
value: JaegerValue;
|
||||
}
|
||||
|
||||
export interface JaegerValue {
|
||||
stringValue: string;
|
||||
doubleValue: string;
|
||||
}
|
||||
|
||||
export interface JaegerGroup {
|
||||
level: number;
|
||||
startPx: number;
|
||||
endPx: number;
|
||||
durationPx: number;
|
||||
startMs: number;
|
||||
endMs: number;
|
||||
durationMs: number;
|
||||
traceId: string;
|
||||
spanId: string;
|
||||
parentSpanId: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
startTimeUnixNano: number;
|
||||
endTimeUnixNano: number;
|
||||
attributes: JaegerAttribute[];
|
||||
children: JaegerGroup[];
|
||||
}
|
||||
@@ -289,6 +289,7 @@ export interface RecentCall {
|
||||
remote_host: string;
|
||||
direction: string;
|
||||
trunk: string;
|
||||
trace_id: string;
|
||||
}
|
||||
|
||||
export interface SpeechCredential {
|
||||
|
||||
Reference in new issue
Block a user