[7.x] [APM] Review feedback (#78752) (#78819)

This commit is contained in:
Dario Gieselaar 2020-09-29 20:12:07 +02:00 committed by GitHub
parent ce96439e6e
commit 63cfbdba5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 11 deletions

View file

@ -69,13 +69,11 @@ export function useTransactionDistribution(urlParams: IUrlParams) {
// selected sample was not found. select a new one:
// sorted by total number of requests, but only pick
// from buckets that have samples
const bucketsSortedByPreference = response.buckets
const bucketsSortedByCount = response.buckets
.filter((bucket) => !isEmpty(bucket.samples))
.sort((bucket) => bucket.count);
const preferredSample = maybe(
bucketsSortedByPreference[0]?.samples[0]
);
const preferredSample = maybe(bucketsSortedByCount[0]?.samples[0]);
history.push({
...history.location,

View file

@ -17,14 +17,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const archiveName = 'apm_8.0.0';
const metadata = archives_metadata[archiveName];
// url parameters
const { start, end } = metadata;
const uiFilters = {};
const url = `/api/apm/services/opbeans-java/transaction_groups/distribution?${qs.stringify({
start,
end,
uiFilters,
start: metadata.start,
end: metadata.end,
uiFilters: {},
transactionName: 'APIRestController#stats',
transactionType: 'request',
})}`;