prateekm commented on a change in pull request #942: Bugfix: Recent CSM refactor was causing some metrics to not be emitted. Fixed <task>-restore-time metric. URL: https://github.com/apache/samza/pull/942#discussion_r263866650
########## File path: samza-core/src/main/scala/org/apache/samza/storage/ContainerStorageManager.java ########## @@ -229,15 +230,15 @@ public ContainerStorageManager(ContainerModel containerModel, StreamMetadataCach scala.collection.immutable.Map<SystemStream, SystemStreamMetadata> inputStreamMetadata = streamMetadataCache.getStreamMetadata(JavaConversions.asScalaSet( this.sideInputSystemStreams.values().stream().flatMap(Set::stream).collect(Collectors.toSet())).toSet(), false); - SystemConsumersMetrics systemConsumersMetrics = new SystemConsumersMetrics( - new MetricsRegistryMap(String.format(SIDEINPUTS_METRICS_NAME, containerModel.getId()))); + SystemConsumersMetrics sideInputSystemConsumersMetrics = new SystemConsumersMetrics(samzaContainerMetrics.registry(), SIDEINPUTS_METRICS_PREFIX); + // we use the same registry as samza-container-metrics MessageChooser chooser = DefaultChooser.apply(inputStreamMetadata, new RoundRobinChooserFactory(), config, - systemConsumersMetrics.registry(), systemAdmins); + sideInputSystemConsumersMetrics.registry(), systemAdmins); Review comment: Minor: Consider passing in the registry explicitly in the constructor instead of getting it from the container metrics. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services