Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

refactor: aggregrate api uses global time (#3911)

Rajat Dabade31b07cc02c24
diff --git a/frontend/src/store/actions/trace/getSpans.ts b/frontend/src/store/actions/trace/getSpans.ts
index 4b2787e7a9..40d49d5959 100644
--- a/frontend/src/store/actions/trace/getSpans.ts
+++ b/frontend/src/store/actions/trace/getSpans.ts
@@ -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,