Compare commits

...

2 Commits

Author SHA1 Message Date
Ashwin Bhatkal
370c5f9032 fix(alertmanager): default jsmops tags to signoz-alert 2026-10-19 18:02:25 +05:30
Aditya Singh
e4e58e2349 fix(explorer): stop reporting dropped order by to sentry (#13153)
#### Description
- The explorer order-by sanitizer sent a Sentry warning each time it
dropped an order-by column. Each new order made a new Sentry issue, and
each new issue paged.
- Dropping a stale order is expected. Since #13085, it happens when a
user switches from List to Time Series or Table.
- The sanitizer no longer reports to Sentry. The filtering is unchanged.

#### Issues closed by this PR

Closes https://github.com/SigNoz/events-pod/issues/180
2026-10-19 11:03:04 +00:00
4 changed files with 8 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
import * as Sentry from '@sentry/react';
import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';
import {
IBuilderQuery,
@@ -7,6 +8,10 @@ import { DataSource } from 'types/common/queryBuilder';
import { getParsedAggregationOptionsForOrderBy } from 'utils/aggregationConverter';
import { sanitizeOrderByForExplorer } from 'utils/sanitizeOrderBy';
jest.mock('@sentry/react', () => ({
captureEvent: jest.fn(),
}));
jest.mock('utils/aggregationConverter', () => ({
getParsedAggregationOptionsForOrderBy: jest.fn(),
}));
@@ -117,6 +122,7 @@ describe('sanitizeOrderByForExplorer', () => {
const result = sanitizeOrderByForExplorer(query);
expect(result).toStrictEqual([]);
expect(Sentry.captureEvent).not.toHaveBeenCalled();
});
it('handles missing orderBy by returning an empty array', () => {

View File

@@ -1,4 +1,3 @@
import * as Sentry from '@sentry/react';
import {
IBuilderQuery,
OrderByPayload,
@@ -20,15 +19,5 @@ export function sanitizeOrderByForExplorer(
const current = query.orderBy || [];
const hasInvalidOrderBy = current.some((o) => !allowed.has(o.columnName));
if (hasInvalidOrderBy) {
Sentry.captureEvent({
message: `Invalid orderBy: current: ${JSON.stringify(
current,
)} - allowed: ${JSON.stringify(Array.from(allowed))}`,
level: 'warning',
});
}
return current.filter((o) => allowed.has(o.columnName));
}

View File

@@ -126,7 +126,7 @@ var DefaultJSMOpsReceiverConfig = JSMOpsReceiverConfig{
},
Message: DefaultJSMOpsMessageTemplate,
Description: DefaultJSMOpsDescriptionTemplate,
Tags: "signoz",
Tags: "signoz-alert",
}
func (c *JSMOpsReceiverConfig) UnmarshalYAML(unmarshal func(any) error) error {

View File

@@ -17,7 +17,7 @@ func TestJSMOpsReceiverConfigDefaults(t *testing.T) {
assert.Equal(t, "key-123", string(c.APIKey))
assert.Equal(t, DefaultJSMOpsMessageTemplate, c.Message)
assert.Equal(t, DefaultJSMOpsDescriptionTemplate, c.Description)
assert.Equal(t, "signoz", c.Tags)
assert.Equal(t, "signoz-alert", c.Tags)
assert.False(t, c.SendResolved()) // default off when omitted, like other channels
ch, err := NewChannelFromReceiver(r, "org-1")