Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5182#discussion_r158161564
  
    --- Diff: 
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java
 ---
    @@ -96,6 +99,15 @@ protected ShardConsumer(KinesisDataFetcher<T> fetcherRef,
                                                        SequenceNumber 
lastSequenceNum,
                                                        KinesisProxyInterface 
kinesis) {
                this.fetcherRef = checkNotNull(fetcherRef);
    +           MetricGroup kinesisMetricGroup = fetcherRef.getRuntimeContext()
    --- End diff --
    
    I feel that passing the `StreamingRuntimeContext` all the way here just to 
register metrics, is not a good idea.
    Is it possible we register the metrics in `FlinkKinesisConsumer` instead? 
That also makes it more visible what metrics the consumer exposes without 
having to dig all the way to this internal `ShardConsumer` thread.


---

Reply via email to