mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-13 12:41:32 +08:00

* feat(trace-details): frontend changes for trace details * feat(trace-detail): address review comments from elipsis * feat(trace0-detail): add the new drawer designs * feat(trace-detail): handle the selected span hover * feat(trace-detail): address theme colors and span selection * feat(trace-detail): fix some more css * feat(trace-detail): fix some more css * feat(trace-detail): add hoverred span and handled no data components for new drawer * feat(trace-detail): handle light mode designs * feat(trace-detail): remove the hover functionality in favor of performance * feat(trace-detail): span lines connectors * feat(trace-detail): span lines connectors * feat(trace-detail): handle the line matching for flamegraph and waterfall * feat(trace-waterfall): change the timeline color to make it less poky * feat(trace-waterfall): added where clause support in trace details page * feat(trace-waterfall): added where clause support in trace details page * feat(trace-detail): handle light mode designs * feat(trace-detail): handle light mode designs * feat(trace-detail): fix build issues * feat(trace-detail): handle loading error state for filters and flamegraph hovered state * feat(trace-detail): fix the hardcoded traceID * feat(trace-detail): remove unnecessaru use effects * feat(trace-detail): handled the flamegraph update with ID * feat(trace-detail): added timestamp bucketing and latency sampling * feat(trace-detail): extract the buckets and span limit in constants * feat(trace-detail): minor VQA comments * feat(trace-detail): remove unnecessaru use effects * feat(trace-detail): add go to related logs * feat(trace-detail): address review comments * feat(trace-detail): address review comments * feat(trace-detail): address review comments * feat(trace-detail): address review comments
32 lines
963 B
TypeScript
32 lines
963 B
TypeScript
import getTraceFlamegraph from 'api/trace/getTraceFlamegraph';
|
|
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
|
|
import { useQuery, UseQueryResult } from 'react-query';
|
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
|
import {
|
|
GetTraceFlamegraphPayloadProps,
|
|
GetTraceFlamegraphSuccessResponse,
|
|
} from 'types/api/trace/getTraceFlamegraph';
|
|
|
|
const useGetTraceFlamegraph = (
|
|
props: GetTraceFlamegraphPayloadProps,
|
|
): UseLicense =>
|
|
useQuery({
|
|
queryFn: () => getTraceFlamegraph(props),
|
|
// if any of the props changes then we need to trigger an API call as the older data will be obsolete
|
|
queryKey: [
|
|
REACT_QUERY_KEY.GET_TRACE_V2_FLAMEGRAPH,
|
|
props.traceId,
|
|
props.selectedSpanId,
|
|
],
|
|
enabled: !!props.traceId,
|
|
keepPreviousData: true,
|
|
refetchOnWindowFocus: false,
|
|
});
|
|
|
|
type UseLicense = UseQueryResult<
|
|
SuccessResponse<GetTraceFlamegraphSuccessResponse> | ErrorResponse,
|
|
unknown
|
|
>;
|
|
|
|
export default useGetTraceFlamegraph;
|