File tree Expand file tree Collapse file tree
kafka-streams-framework/src/main/java/org/hypertrace/core/kafkastreams/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020import static org .apache .kafka .streams .StreamsConfig .ROCKSDB_CONFIG_SETTER_CLASS_CONFIG ;
2121import static org .apache .kafka .streams .StreamsConfig .TOPOLOGY_OPTIMIZATION ;
2222import static org .apache .kafka .streams .StreamsConfig .consumerPrefix ;
23+ import static org .apache .kafka .streams .StreamsConfig .mainConsumerPrefix ;
2324import static org .apache .kafka .streams .StreamsConfig .producerPrefix ;
2425import static org .apache .kafka .streams .StreamsConfig .topicPrefix ;
2526
@@ -252,9 +253,10 @@ public Map<String, Object> getBaseStreamsConfig() {
252253 // ##########################
253254 baseStreamsConfig .put (topicPrefix (RETENTION_MS_CONFIG ), TimeUnit .HOURS .toMillis (12 ));
254255
255- // set metrics interceptor
256+ // set metrics interceptor, only apply to the main consumer and skip instrumenting the restore
257+ // consumer
256258 baseStreamsConfig .put (
257- consumerPrefix (INTERCEPTOR_CLASSES_CONFIG ), MetricsInterceptor .class .getName ());
259+ mainConsumerPrefix (INTERCEPTOR_CLASSES_CONFIG ), MetricsInterceptor .class .getName ());
258260
259261 return baseStreamsConfig ;
260262 }
You can’t perform that action at this time.
0 commit comments