refactor: aggregrate api uses global time (#3911)

This commit is contained in:
Rajat Dabade 2023-11-22 13:43:29 +05:30 committed by GitHub
parent d42bf50ddb
commit 31b07cc02c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,23 +28,10 @@ export const GetSpans = (
return;
}
const { selectedTime } = globalTime;
if (traces.filterLoading) {
return;
}
// @TODO refactor this logic when share url functionlity is updated
const isCustomSelected = selectedTime === 'custom';
const end = isCustomSelected
? globalTime.maxTime + 15 * 60 * 1000000000
: props.end;
const start = isCustomSelected
? globalTime.minTime - 15 * 60 * 1000000000
: props.start;
if (!spansGraph.loading) {
dispatch({
type: UPDATE_TRACE_GRAPH_LOADING,
@ -55,12 +42,12 @@ export const GetSpans = (
}
const response = await getSpans({
end,
end: props.end,
function: props.function,
groupBy: props.groupBy,
selectedFilter: props.selectedFilter,
selectedTags: props.selectedTags,
start,
start: props.start,
step: props.step,
isFilterExclude: props.isFilterExclude,
spanKind: props.spanKind,