Skip to content

Commit

Permalink
Add TODOs for filtering of extra (node) metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjoranv committed Jun 22, 2019
1 parent c503629 commit 599758d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public List<MetricsPacket.Builder> getMetrics() {
}

public void setExtraMetrics(List<MetricsPacket.Builder> externalPackets) {
// TODO: Metrics filtering per consumer is not yet implemented.
// Split each packet per metric, and re-aggregate based on the metrics each consumer wants. Then filter out all packages with no consumers.
log.log(DEBUG, () -> "Setting new external metrics with " + externalPackets.size() + " metrics packets.");
externalPackets.forEach(packet -> {
packet.addConsumers(consumers.getAllConsumers())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public void system_metrics_are_added() {
service0.setSystemMetrics(oldSystemMetrics);
}

// TODO: test that non-whitelisted metrics are filtered out, but this is currently not the case, see ExternalMetrics.setExtraMetrics
@Test
public void extra_metrics_packets_containing_whitelisted_metrics_are_added() {
metricsManager.setExtraMetrics(ImmutableList.of(
Expand Down

0 comments on commit 599758d

Please sign in to comment.