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.

chore: allow url as label value in alerts (#8244)

Amlan Kumar Nandye5c0d9e44a51
diff --git a/frontend/src/container/FormAlertRules/labels/index.tsx b/frontend/src/container/FormAlertRules/labels/index.tsx
index 250c48be8a..5b0d7f5243 100644
--- a/frontend/src/container/FormAlertRules/labels/index.tsx
+++ b/frontend/src/container/FormAlertRules/labels/index.tsx
@@ -85,7 +85,13 @@ function LabelSelect({
}, [handleBlur]);
const handleLabelChange = (event: ChangeEvent<HTMLInputElement>): void => {
- setCurrentVal(event.target?.value.replace(':', ''));
+ // Remove the colon if it's the last character.
+ // As the colon is used to separate the key and value in the query.
+ setCurrentVal(
+ event.target?.value.endsWith(':')
+ ? event.target?.value.slice(0, -1)
+ : event.target?.value,
+ );
};
const handleClose = (key: string): void => {