Skip to content

Commit

Permalink
Use HDR for percentiles
Browse files Browse the repository at this point in the history
Closes #62399
  • Loading branch information
sorenlouv committed Apr 30, 2020
1 parent ffe5166 commit 8622796
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export function transactionGroupsFetcher(
sample: { top_hits: { size: 1, sort } },
avg: { avg: { field: TRANSACTION_DURATION } },
p95: {
percentiles: { field: TRANSACTION_DURATION, percents: [95] }
percentiles: {
field: TRANSACTION_DURATION,
percents: [95],
hdr: { number_of_significant_value_digits: 2 }
}
},
sum: { sum: { field: TRANSACTION_DURATION } }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ export function timeseriesFetcher({
aggs: {
avg: { avg: { field: TRANSACTION_DURATION } },
pct: {
percentiles: { field: TRANSACTION_DURATION, percents: [95, 99] }
percentiles: {
field: TRANSACTION_DURATION,
percents: [95, 99],
hdr: { number_of_significant_value_digits: 2 }
}
}
}
},
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/apm/typings/elasticsearch/aggregations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface AggregationOptionsByType {
percentiles: {
field: string;
percents?: number[];
hdr?: { number_of_significant_value_digits: number };
};
extended_stats: {
field: string;
Expand Down

0 comments on commit 8622796

Please sign in to comment.