Added support for aggregation operation parameters in Prometheus queries
@@ -63,6 +63,8 @@ public interface HttpQuery {
Optional<String> getAggregationOperator();
+ List<String> getAggregationOperatorParameters();
+
String getMetric();
List<LabelValue> getLabelValues();
@@ -85,6 +87,17 @@ public interface HttpQuery {
closeAggregation = true;
}
+ // are there aggregation operator parameters?
+ if (closeAggregation) {
+ final List<String> params = getAggregationOperatorParameters();
+ if (params != null && !params.isEmpty()) {
+ for (String param : params) {
+ queryExpression.append(param);
+ queryExpression.append(',');
+ }
+ }
+ }
+
// is there a query function?
final String function = getFunction().orElse(null);
boolean closeFunction = false;
