Skip to content

Commit

Permalink
[APM] Migrate deprecated date_histogram parameter (elastic#39886)
Browse files Browse the repository at this point in the history
* [APM] Migrate deprecated date_histogram parameter

Closes elastic#39584.

Replaces 'interval' with 'fixed_interval'

* Update snapshot
  • Loading branch information
dgieselaar committed Jul 8, 2019
1 parent ada2aac commit d221668
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/apm/server/lib/helpers/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function getMetricsDateHistogramParams(start: number, end: number) {
field: '@timestamp',

// ensure minimum bucket size of 30s since this is the default resolution for metric data
interval: `${Math.max(bucketSize, 30)}s`,
fixed_interval: `${Math.max(bucketSize, 30)}s`,

min_doc_count: 0,
extended_bounds: { min: start, max: end }
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function anomalySeriesFetcher({
ml_avg_response_times: {
date_histogram: {
field: 'timestamp',
interval: intervalString,
fixed_interval: intervalString,
min_doc_count: 0,
extended_bounds: {
min: newStart,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function timeseriesFetcher({
response_times: {
date_histogram: {
field: '@timestamp',
interval: intervalString,
fixed_interval: intervalString,
min_doc_count: 0,
extended_bounds: { min: start, max: end }
},
Expand All @@ -76,7 +76,7 @@ export function timeseriesFetcher({
timeseries: {
date_histogram: {
field: '@timestamp',
interval: intervalString,
fixed_interval: intervalString,
min_doc_count: 0,
extended_bounds: { min: start, max: end }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function bucketFetcher(
distribution: {
histogram: {
field: TRANSACTION_DURATION,
interval: bucketSize,
fixed_interval: bucketSize,
min_doc_count: 0,
extended_bounds: {
min: 0,
Expand Down

0 comments on commit d221668

Please sign in to comment.