Skip to content

Conversation

@scttcper
Copy link
Member

@scttcper scttcper commented Nov 8, 2025

Apparently we were missing these entirely. Also fixes some issues when editing an existing anomaly detector and cleans up an unused config value.

Apparently we were missing these entirely. Also fixes some issues when editing an existing anomaly detector
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 8, 2025
@codecov
Copy link

codecov bot commented Nov 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
12410 1 12409 10
View the top 1 failed test(s) by shortest run time
DetectorEdit Metric Detector creates detector with dynamic detection and no resolution thresholds
Stack Traces | 1.93s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: "....../organizations/org-slug/detectors/", ObjectContaining {"data": ObjectContaining {"conditionGroup": {"conditions": [{"comparison": {"seasonality": "auto", "sensitivity": "high", "thresholdType": 0}, "conditionResult": 75, "type": "anomaly_detection"}], "logicType": "any"}, "config": {"detectionType": "dynamic", "sensitivity": "high"}, "dataSources": [{"aggregate": "count(span.duration)", "dataset": "events_analytics_platform", "environment": null, "eventTypes": ["trace_item_span"], "query": "", "queryType": 1, "timeWindow": 3600}], "name": "Dynamic", "owner": null, "projectId": "2", "type": "metric_issue", "workflowIds": []}}
Received: "....../organizations/org-slug/detectors/", {"data": {"conditionGroup": {"conditions": [{"comparison": {"seasonality": "auto", "sensitivity": "high", "thresholdType": 0}, "conditionResult": 75, "type": "anomaly_detection"}], "logicType": "any"}, "config": {"detectionType": "dynamic"}, "dataSources": [{"aggregate": "count(span.duration)", "dataset": "events_analytics_platform", "environment": null, "eventTypes": ["trace_item_span"], "query": "", "queryType": 1, "timeWindow": 3600}], "description": null, "name": "Dynamic", "owner": null, "projectId": "2", "type": "metric_issue", "workflowIds": []}, "error": [Function error], "method": "POST", "success": [Function success]}

Number of calls: 1

Ignored nodes: comments, script, style
...
    at toHaveBeenCalledWith (.../views/detectors/new-setting.spec.tsx:563:36)
    at runWithExpensiveErrorDiagnosticsDisabled (.../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/config.js:47:12)
    at checkCallback (.../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/wait-for.js:124:77)
    at checkRealTimersCallback (.../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/wait-for.js:118:16)
    at Timeout.task [as _onTimeout] (.../sentry/node_modules/.pnpm/jsdom@26.1..../jsdom/browser/Window.js:579:19)
    at listOnTimeout (node:internal/timers:588:17)
    at processTimers (node:internal/timers:523:7)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@scttcper scttcper marked this pull request as ready for review November 10, 2025 18:58
@scttcper scttcper requested a review from a team as a code owner November 10, 2025 18:58
@mifu67 mifu67 self-requested a review November 10, 2025 19:03
? detector.config.thresholdType
: DEFAULT_THRESHOLD_METRIC_FORM_DATA.thresholdType,
// Dynamic fields - extract from anomaly detection condition for dynamic detectors
sensitivity: anomalyCondition.sensitivity,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also be removed here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is sensitivity

interface MetricDetectorConfigDynamic {
detectionType: 'dynamic';
seasonality?: 'auto' | 'daily' | 'weekly' | 'monthly';
sensitivity?: 'low' | 'medium' | 'high';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensitivity needs to be removed too 😅

@scttcper scttcper enabled auto-merge (squash) November 11, 2025 00:21
@scttcper scttcper merged commit 23618c5 into master Nov 11, 2025
46 checks passed
@scttcper scttcper deleted the scttcper/dynamic-alert-thresholds branch November 11, 2025 00:32
Jesse-Box pushed a commit that referenced this pull request Nov 12, 2025
Apparently we were missing these entirely. Also fixes some issues when
editing an existing anomaly detector and cleans up an unused config
value.
andrewshie-sentry pushed a commit that referenced this pull request Nov 13, 2025
Apparently we were missing these entirely. Also fixes some issues when
editing an existing anomaly detector and cleans up an unused config
value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants