Skip to content

Commit d314e46

Browse files
authored
Use HDR for percentiles (#64758)
1 parent 856a820 commit d314e46

File tree

7 files changed

+35
-2
lines changed

7 files changed

+35
-2
lines changed

x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/fetcher.test.ts.snap

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/queries.test.ts.snap

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,11 @@ export function transactionGroupsFetcher(
8383
sample: { top_hits: { size: 1, sort } },
8484
avg: { avg: { field: TRANSACTION_DURATION } },
8585
p95: {
86-
percentiles: { field: TRANSACTION_DURATION, percents: [95] }
86+
percentiles: {
87+
field: TRANSACTION_DURATION,
88+
percents: [95],
89+
hdr: { number_of_significant_value_digits: 2 }
90+
}
8791
},
8892
sum: { sum: { field: TRANSACTION_DURATION } }
8993
}

x-pack/plugins/apm/server/lib/transactions/__snapshots__/queries.test.ts.snap

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/fetcher.test.ts.snap

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ export function timeseriesFetcher({
6969
aggs: {
7070
avg: { avg: { field: TRANSACTION_DURATION } },
7171
pct: {
72-
percentiles: { field: TRANSACTION_DURATION, percents: [95, 99] }
72+
percentiles: {
73+
field: TRANSACTION_DURATION,
74+
percents: [95, 99],
75+
hdr: { number_of_significant_value_digits: 2 }
76+
}
7377
}
7478
}
7579
},

x-pack/plugins/apm/typings/elasticsearch/aggregations.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export interface AggregationOptionsByType {
8686
percentiles: {
8787
field: string;
8888
percents?: number[];
89+
hdr?: { number_of_significant_value_digits: number };
8990
};
9091
extended_stats: {
9192
field: string;

0 commit comments

Comments
 (0)