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: avoid read-only variables mutation (#10548)
Ashwin Bhatkalf576a86dd164
diff --git a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/useDashboardVariableUpdate.ts b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/useDashboardVariableUpdate.tsindex 35f194e3a9..3f88de0cbd 100644--- a/frontend/src/container/DashboardContainer/DashboardVariablesSelection/useDashboardVariableUpdate.ts+++ b/frontend/src/container/DashboardContainer/DashboardVariablesSelection/useDashboardVariableUpdate.ts@@ -67,17 +67,18 @@ export const useDashboardVariableUpdate = (): UseDashboardVariableUpdateReturn =const oldVariables = prev?.data.variables;// this is added to handle case where we have two different// schemas for variable response- if (oldVariables?.[id]) {- oldVariables[id] = {- ...oldVariables[id],+ const updatedVariables = { ...oldVariables };+ if (updatedVariables?.[id]) {+ updatedVariables[id] = {+ ...updatedVariables[id],selectedValue: value,allSelected,haveCustomValuesSelected,};}- if (oldVariables?.[name]) {- oldVariables[name] = {- ...oldVariables[name],+ if (updatedVariables?.[name]) {+ updatedVariables[name] = {+ ...updatedVariables[name],selectedValue: value,allSelected,haveCustomValuesSelected,@@ -87,9 +88,7 @@ export const useDashboardVariableUpdate = (): UseDashboardVariableUpdateReturn =...prev,data: {...prev?.data,- variables: {- ...oldVariables,- },+ variables: updatedVariables,},};}