Skip to content

Commit

Permalink
maps shoukld offer tsdb counter fields only when its supported by es (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored Mar 9, 2023
1 parent 9eb1c50 commit 48b3b90
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 48b3b90

Please sign in to comment.