We are using spring boot Kafka streams integration to consume topics in our app.
Prometheus, grafana and a kafka exporter is used for monitoring.
The problem is that when we change the code to stop using some of the topic our grafana board (and alters) will show that the lag is increasing.
sum by(consumergroup, topic)(kafka_consumergroup_lag{consumergroup=~"$namespace.$deployment.*"})
The expected behavior is that all kafka_consumergroup_lag for consumer groups that was removed will not show up. How it can be done?