Skip to content

Commit

Permalink
maps shoukld offer tsdb counter fields only when its supported by es (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored and bmorelli25 committed Mar 10, 2023
1 parent 72f73f4 commit 0c086b0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ function filterFieldsForAgg(fields: DataViewField[], aggType: AGG_TYPE) {
}

return fields.filter((field) => {
return field.aggregatable && metricAggFieldTypes.includes(field.type);
return (
field.aggregatable &&
metricAggFieldTypes.includes(field.type) &&
(field.timeSeriesMetric !== 'counter' || ['min', 'max'].includes(aggType))
);
});
}

Expand Down

0 comments on commit 0c086b0

Please sign in to comment.