use of org.platformlayer.metrics.model.MetricQuery in project platformlayer by platformlayer.
the class FederatedPlatformLayerClient method getMetric.
@Override
public MetricDataStream getMetric(MetricQuery query) throws PlatformLayerClientException {
MappedPlatformLayerKey mapped = mapToChild(query.item);
MetricQuery mappedQuery = query.copy();
mappedQuery.item = mapped.key;
return mapped.child.client.getMetric(mappedQuery);
}
use of org.platformlayer.metrics.model.MetricQuery in project platformlayer by platformlayer.
the class GetMetric method runCommand.
@Override
public Object runCommand() throws PlatformLayerClientException {
PlatformLayerClient client = getPlatformLayerClient();
MetricQuery query = new MetricQuery();
query.item = getContext().pathToItem(getProject(), path);
if (filters != null) {
query.filters.addAll(filters);
}
if (projections != null) {
query.projections.addAll(projections);
}
query.setFlatten(flatten);
MetricDataStream dataStream = client.getMetric(query);
return dataStream;
}
Aggregations