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: correct step numbering for non-metric based alerts (#8367)

Amlan Kumar Nandycd4766ec2b5c
diff --git a/frontend/public/locales/en-GB/alerts.json b/frontend/public/locales/en-GB/alerts.json
index 8dd0ccbe47..8219da7387 100644
--- a/frontend/public/locales/en-GB/alerts.json
+++ b/frontend/public/locales/en-GB/alerts.json
@@ -14,8 +14,8 @@
"remove_label_confirm": "This action will remove all the labels. Do you want to proceed?",
"remove_label_success": "Labels cleared",
"alert_form_step1": "Step 1 - Define the metric",
- "alert_form_step2": "Step 2 - Define Alert Conditions",
- "alert_form_step3": "Step 3 - Alert Configuration",
+ "alert_form_step2": "Step {{step}} - Define Alert Conditions",
+ "alert_form_step3": "Step {{step}} - Alert Configuration",
"metric_query_max_limit": "Can not create query. You can create maximum of 5 queries",
"confirm_save_title": "Save Changes",
"confirm_save_content_part1": "Your alert built with",
diff --git a/frontend/public/locales/en-GB/rules.json b/frontend/public/locales/en-GB/rules.json
index 63ae437d7f..edb6d6f3ef 100644
--- a/frontend/public/locales/en-GB/rules.json
+++ b/frontend/public/locales/en-GB/rules.json
@@ -7,8 +7,8 @@
"remove_label_confirm": "This action will remove all the labels. Do you want to proceed?",
"remove_label_success": "Labels cleared",
"alert_form_step1": "Step 1 - Define the metric",
- "alert_form_step2": "Step 2 - Define Alert Conditions",
- "alert_form_step3": "Step 3 - Alert Configuration",
+ "alert_form_step2": "Step {{step}} - Define Alert Conditions",
+ "alert_form_step3": "Step {{step}} - Alert Configuration",
"metric_query_max_limit": "Can not create query. You can create maximum of 5 queries",
"confirm_save_title": "Save Changes",
"confirm_save_content_part1": "Your alert built with",
diff --git a/frontend/public/locales/en/rules.json b/frontend/public/locales/en/rules.json
index 63ae437d7f..edb6d6f3ef 100644
--- a/frontend/public/locales/en/rules.json
+++ b/frontend/public/locales/en/rules.json
@@ -7,8 +7,8 @@
"remove_label_confirm": "This action will remove all the labels. Do you want to proceed?",
"remove_label_success": "Labels cleared",
"alert_form_step1": "Step 1 - Define the metric",
- "alert_form_step2": "Step 2 - Define Alert Conditions",
- "alert_form_step3": "Step 3 - Alert Configuration",
+ "alert_form_step2": "Step {{step}} - Define Alert Conditions",
+ "alert_form_step3": "Step {{step}} - Alert Configuration",
"metric_query_max_limit": "Can not create query. You can create maximum of 5 queries",
"confirm_save_title": "Save Changes",
"confirm_save_content_part1": "Your alert built with",
diff --git a/frontend/src/container/FormAlertRules/QuerySection.tsx b/frontend/src/container/FormAlertRules/QuerySection.tsx
index 6a14f50e9e..3d4c077849 100644
--- a/frontend/src/container/FormAlertRules/QuerySection.tsx
+++ b/frontend/src/container/FormAlertRules/QuerySection.tsx
@@ -212,9 +212,12 @@ function QuerySection({
return null;
}
};
+
+ const step2Label = alertDef.alertType === 'METRIC_BASED_ALERT' ? '2' : '1';
+
return (
<>
- <StepHeading> {t('alert_form_step2')}</StepHeading>
+ <StepHeading> {t('alert_form_step2', { step: step2Label })}</StepHeading>
<FormContainer>
<div>{renderTabs(alertType)}</div>
{renderQuerySection(currentTab)}
diff --git a/frontend/src/container/FormAlertRules/RuleOptions.tsx b/frontend/src/container/FormAlertRules/RuleOptions.tsx
index 8eebb8268d..a30321fcfd 100644
--- a/frontend/src/container/FormAlertRules/RuleOptions.tsx
+++ b/frontend/src/container/FormAlertRules/RuleOptions.tsx
@@ -371,9 +371,11 @@ function RuleOptions({
selectedCategory?.name,
);
+ const step3Label = alertDef.alertType === 'METRIC_BASED_ALERT' ? '3' : '2';
+
return (
<>
- <StepHeading>{t('alert_form_step3')}</StepHeading>
+ <StepHeading>{t('alert_form_step3', { step: step3Label })}</StepHeading>
<FormContainer>
{queryCategory === EQueryType.PROM && renderPromRuleOptions()}
{queryCategory !== EQueryType.PROM &&