Skip to content
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] Review feedback from distribution + transaction metrics #78752

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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