-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[APM] Use model_plot as a signal for anomaly scores #77756
[APM] Use model_plot as a signal for anomaly scores #77756
Conversation
Pinging @elastic/apm-ui (Team:apm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits about inlining. Other than that 👍
const lte = end; | ||
// fetch data for at least 30 minutes | ||
const gte = Math.min(end - 30 * 60 * 1000, start); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these would read better if they were inlined. A const named "lte" without context is pretty cryptic.
transactionType, | ||
jobId, | ||
actualValue: mlResult?.actual?.[0], | ||
anomalyScore: mlResult?.record_score || 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: any reason some of these are inlined and others are not?
transactionType, | |
jobId, | |
actualValue: mlResult?.actual?.[0], | |
anomalyScore: mlResult?.record_score || 0, | |
transactionType: mlResult?.job_id, | |
jobId: mlResult?.by_field_value, | |
actualValue: mlResult?.actual?.[0], | |
anomalyScore: mlResult?.record_score || 0, |
@@ -130,13 +143,15 @@ function transformResponseToServiceAnomalies( | |||
response.aggregations?.services.buckets ?? [] | |||
).reduce( | |||
(statsByServiceName, { key: serviceName, top_score: topScoreAgg }) => { | |||
const mlResult = topScoreAgg.hits.hits[0]._source; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You had this as a maybe
previously? Was that not the case?
(I like it better now for sure)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's always there, because we don't use min_doc_count: 0. So the maybe
here was too defensive anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 👍
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
Closes #77083.
Before:


After:

