-
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] APM Correlations: Fix chart errors caused by inconsistent histogram range steps. #138259
Changes from all commits
5f5d445
f8c3ef6
b0c2e0d
35c5021
64fff29
4ad0a05
73241a7
cde87ac
52cf77e
62db8d8
85b2ff2
d0a41b3
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 |
---|---|---|
|
@@ -86,20 +86,25 @@ export function useLatencyCorrelations() { | |
}; | ||
|
||
// Initial call to fetch the overall distribution for the log-log plot. | ||
const { overallHistogram, totalDocCount, percentileThresholdValue } = | ||
await callApmApi( | ||
'POST /internal/apm/latency/overall_distribution/transactions', | ||
{ | ||
signal: abortCtrl.current.signal, | ||
params: { | ||
body: { | ||
...fetchParams, | ||
percentileThreshold: DEFAULT_PERCENTILE_THRESHOLD, | ||
chartType: LatencyDistributionChartType.latencyCorrelations, | ||
}, | ||
const { | ||
overallHistogram, | ||
totalDocCount, | ||
percentileThresholdValue, | ||
durationMin, | ||
durationMax, | ||
} = await callApmApi( | ||
'POST /internal/apm/latency/overall_distribution/transactions', | ||
{ | ||
signal: abortCtrl.current.signal, | ||
params: { | ||
body: { | ||
...fetchParams, | ||
percentileThreshold: DEFAULT_PERCENTILE_THRESHOLD, | ||
chartType: LatencyDistributionChartType.latencyCorrelations, | ||
Comment on lines
+89
to
+103
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. This call is exactly the same as the one on 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. Since we'd like to get this as a bugfix into |
||
}, | ||
} | ||
); | ||
}, | ||
} | ||
); | ||
responseUpdate.overallHistogram = overallHistogram; | ||
responseUpdate.totalDocCount = totalDocCount; | ||
responseUpdate.percentileThresholdValue = percentileThresholdValue; | ||
|
@@ -192,7 +197,12 @@ export function useLatencyCorrelations() { | |
{ | ||
signal: abortCtrl.current.signal, | ||
params: { | ||
body: { ...fetchParams, fieldValuePairs: fieldValuePairChunk }, | ||
body: { | ||
...fetchParams, | ||
durationMin, | ||
durationMax, | ||
fieldValuePairs: fieldValuePairChunk, | ||
}, | ||
}, | ||
} | ||
); | ||
|
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.
Have you considered not blocking this call? So we'd render the chart with the histogram and load the errors later? We could even add an indication that errors are still being fetched on the UI.
cc: @formgeist
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.
Good suggestion, I tweaked the loading behavior in 85b2ff2. After loading the overall histogram data we'll now already trigger an update that displays the chart with the available data and updates the progress bar. The updated jest tests also reflect the updated progress steps of the progress bar.