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: create and store label when colon is pressed (#2886)

Daman Arora754ba93df967
diff --git a/frontend/src/container/FormAlertRules/labels/index.tsx b/frontend/src/container/FormAlertRules/labels/index.tsx
index ef7b94d01f..30583e12f9 100644
--- a/frontend/src/container/FormAlertRules/labels/index.tsx
+++ b/frontend/src/container/FormAlertRules/labels/index.tsx
@@ -84,8 +84,8 @@ function LabelSelect({
handleBlur();
}, [handleBlur]);
- const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {
- setCurrentVal(e.target?.value);
+ const handleLabelChange = (event: ChangeEvent<HTMLInputElement>): void => {
+ setCurrentVal(event.target?.value.replace(':', ''));
};
const handleClose = (key: string): void => {
@@ -133,9 +133,9 @@ function LabelSelect({
<div style={{ display: 'flex', width: '100%' }}>
<Input
placeholder={renderPlaceholder()}
- onChange={handleChange}
+ onChange={handleLabelChange}
onKeyUp={(e): void => {
- if (e.key === 'Enter' || e.code === 'Enter') {
+ if (e.key === 'Enter' || e.code === 'Enter' || e.key === ':') {
send('NEXT');
}
}}