-
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
[ML] Show at least one correlation value and consolidate correlations columns #126683
Changes from 8 commits
575f816
0743eb4
dacd1be
c7266d0
acef4cf
afd96a9
dd2b011
1a8eb64
0ff6a84
7a81024
9f57ca3
bfe6cfb
abb1e2a
eb78525
d7e62bb
e632407
7618d4b
a32e958
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ export function useFailedTransactionsCorrelations() { | |
// and histogram data for statistically significant results. | ||
const responseUpdate: FailedTransactionsCorrelationsResponse = { | ||
ccsWarning: false, | ||
fallbackResult: undefined, | ||
}; | ||
|
||
const [overallHistogramResponse, errorHistogramRespone] = | ||
|
@@ -149,6 +150,7 @@ export function useFailedTransactionsCorrelations() { | |
|
||
const failedTransactionsCorrelations: FailedTransactionsCorrelation[] = | ||
[]; | ||
let fallbackResult: FailedTransactionsCorrelation | undefined; | ||
const fieldsToSample = new Set<string>(); | ||
const chunkSize = 10; | ||
let chunkLoadCounter = 0; | ||
|
@@ -177,6 +179,21 @@ export function useFailedTransactionsCorrelations() { | |
getFailedTransactionsCorrelationsSortedByScore([ | ||
...failedTransactionsCorrelations, | ||
]); | ||
} else { | ||
// If there's no significant correlations found and there's a fallback result | ||
// Update the highest ranked/scored fall back result | ||
if (pValues.fallbackResult) { | ||
if (!fallbackResult) { | ||
fallbackResult = pValues.fallbackResult; | ||
} else { | ||
if ( | ||
pValues.fallbackResult.normalizedScore > | ||
fallbackResult.normalizedScore | ||
) { | ||
fallbackResult = pValues.fallbackResult; | ||
} | ||
} | ||
} | ||
} | ||
|
||
chunkLoadCounter++; | ||
|
@@ -209,7 +226,12 @@ export function useFailedTransactionsCorrelations() { | |
); | ||
|
||
responseUpdate.fieldStats = stats; | ||
setResponse({ ...responseUpdate, loaded: LOADED_DONE, isRunning: false }); | ||
setResponse({ | ||
...responseUpdate, | ||
fallbackResult, | ||
loaded: LOADED_DONE, | ||
isRunning: false, | ||
}); | ||
Comment on lines
+229
to
+234
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we are no longer using kibana search strategies, would it be possible to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed in Slack, since this might be out of scope of the PR, let's table this for now and revisit in the future for a better implementation. |
||
setResponse.flush(); | ||
} catch (e) { | ||
if (!abortCtrl.current.signal.aborted) { | ||
|
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.
Would be good to add an info tooltip for the Impact column, and one for the Score column on the failed transactions tab, if only to say what the range of values is.
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.
The "impact" seems pretty straight-forward to me and is already mentioned in the popover help for these pages, so IMO a tooltip there isn't necessary.
However, I think it makes sense to have a tooltip for "score". Can we base it on what we have
for "correlation"?:
kibana/x-pack/plugins/apm/public/components/app/correlations/latency_correlations.tsx
Line 129 in 247d3a5
For example: "The score [0-1] of an attribute; the greater the score, the more an attribute contributes to failed transactions." or "more likely it is that an attribute..."
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.
Updated here abb1e2a