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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
[Fix]: range issue in uplot charts (#4262)
Rajat Dabadef487c1956b5e
diff --git a/frontend/src/lib/uPlotLib/utils/getYAxisScale.ts b/frontend/src/lib/uPlotLib/utils/getYAxisScale.tsindex 309210ff1f..503abd5790 100644--- a/frontend/src/lib/uPlotLib/utils/getYAxisScale.ts+++ b/frontend/src/lib/uPlotLib/utils/getYAxisScale.ts@@ -1,5 +1,6 @@import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';import { convertValue } from 'lib/getConvertedValue';+import { isFinite } from 'lodash-es';import { QueryDataV3 } from 'types/api/widgets/getQuery';function findMinMaxValues(data: QueryDataV3[]): [number, number] {@@ -9,9 +10,10 @@ function findMinMaxValues(data: QueryDataV3[]): [number, number] {entry.series?.forEach((series) => {series.values.forEach((valueObj) => {const value = parseFloat(valueObj.value);- if (!value) return;- min = Math.min(min, value);- max = Math.max(max, value);+ if (isFinite(value)) {+ min = Math.min(min, value);+ max = Math.max(max, value);+ }});});});@@ -82,5 +84,10 @@ export const getYAxisScale = (if (areAllSeriesEmpty(series)) return { auto: true };const [min, max] = getRange(thresholds, series, yAxisUnit);++ // Min and Max value can be same if the value is same for all the series+ if (min === max) {+ return { auto: true };+ }return { auto: false, range: [min, max] };};