agresch commented on a change in pull request #3329:
URL: https://github.com/apache/storm/pull/3329#discussion_r490458279
##########
File path:
storm-client/src/jvm/org/apache/storm/metrics2/StormMetricRegistry.java
##########
@@ -171,6 +188,59 @@ public Histogram histogram(String name, TopologyContext
context) {
metrics.put(names.getV2TickName(), metric);
}
+ private <T> Gauge<T> registerGauge(String name, MetricNames metricNames,
Gauge<T> gauge, int taskId,
+ String componentId, String streamId) {
+ TaskMetricDimensions taskMetricDimensions = new
TaskMetricDimensions(taskId, componentId, streamId, this);
+ synchronized (this) {
+ TaskMetricRepo repo =
taskMetrics.computeIfAbsent(taskMetricDimensions, (k) -> new TaskMetricRepo());
+ repo.addGauge(name, gauge);
Review comment:
agreed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]