Skip to content

Conversation

@shayna-ch
Copy link
Member

@shayna-ch shayna-ch commented Nov 26, 2025

Add Seer anomaly thresholds to metric monitor graph.

image

Red lines are upper and lower thresholds, yellow line is the historical value that seer has

Feature flag: organizations:anomaly-detection-threshold-data (only enabled for me right now, if you want to see the changes add your email)

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 26, 2025
@shayna-ch shayna-ch marked this pull request as ready for review November 26, 2025 21:39
@shayna-ch shayna-ch requested a review from a team as a code owner November 26, 2025 21:39
@shayna-ch shayna-ch requested a review from a team November 26, 2025 21:41

const additionalSeries = useMemo(() => {
const baseSeries = [...thresholdAdditionalSeries];
const baseSeries = [...thresholdAdditionalSeries, ...anomalyThresholdSeries];
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Y-axis bounds don't account for anomaly threshold values

The maxValue calculation only considers series and thresholdMaxValue, but doesn't include values from the new anomalyThresholdSeries (specifically yhat_upper, yhat_lower, and value). The existing useMetricDetectorThresholdSeries hook returns a maxValue to ensure thresholds are visible, but useMetricDetectorAnomalyThresholds only returns the series without a max value. When the Y-axis max is explicitly set at line 306, anomaly threshold lines that exceed this bound will be clipped and not visible to users.

Additional Locations (1)

Fix in Cursor Fix in Web


const upperBoundData: Array<[number, number]> = [];
const lowerBoundData: Array<[number, number]> = [];
const seerValueData: Array<[number, number]> = [];
Copy link
Member

Choose a reason for hiding this comment

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

are we including the seer value just for debugging with plans to remove it later?

Copy link
Member Author

@shayna-ch shayna-ch Dec 1, 2025

Choose a reason for hiding this comment

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

yep! there are some things that seem out of sync so im including it for now for debugging(this is why I changed the feature flag to be email only)

@shayna-ch shayna-ch merged commit 4ad63b2 into master Dec 1, 2025
52 checks passed
@shayna-ch shayna-ch deleted the shayna-ch/add-threshold-to-graph branch December 1, 2025 17:28
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.

3 participants