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.

fix: alert threshold disappears on run query (#2888)

Chintan Sudanibd6745dd662f
diff --git a/frontend/src/container/FormAlertRules/RuleOptions.tsx b/frontend/src/container/FormAlertRules/RuleOptions.tsx
index 254dafa1a4..22238a941b 100644
--- a/frontend/src/container/FormAlertRules/RuleOptions.tsx
+++ b/frontend/src/container/FormAlertRules/RuleOptions.tsx
@@ -140,12 +140,14 @@ function RuleOptions({
{queryCategory === EQueryType.PROM
? renderPromRuleOptions()
: renderThresholdRuleOpts()}
- <InputNumber
- addonBefore={t('field_threshold')}
- value={alertDef?.condition?.target}
- onChange={onChange}
- type="number"
- />
+ <Form.Item name={['condition', 'target']}>
+ <InputNumber
+ addonBefore={t('field_threshold')}
+ value={alertDef?.condition?.target}
+ onChange={onChange}
+ type="number"
+ />
+ </Form.Item>
</FormContainer>
</>
);