Skip to content

Commit

Permalink
[APM] Review feedback from distribution + transaction metrics (elasti…
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Sep 29, 2020
1 parent 73dcb9c commit 670dd48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions x-pack/plugins/apm/public/hooks/useTransactionDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})}`;
Expand Down

0 comments on commit 670dd48

Please sign in to comment.