Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gauge double registration warning for Kafka consumer metrics #5757

Open
MichaelVilser opened this issue Dec 24, 2024 · 0 comments
Open

Gauge double registration warning for Kafka consumer metrics #5757

MichaelVilser opened this issue Dec 24, 2024 · 0 comments

Comments

@MichaelVilser
Copy link

Since #5688 we observe warnings being logged for the default kafka consumer gauge metrics such as 'kafka.consumer.fetch.manager.bytes.consumed.rate' in the form of "This Gauge has been already registered".

Stack trace of when a gauge metric is registered
1stTime_on_startup.txt
2ndTime_after_startup.txt

Looking at this function, it seems like this behavior is actually intended:

@Override
public void bindTo(MeterRegistry registry) {
this.registry = registry;
commonTags = getCommonTags(registry);
prepareToBindMetrics(registry);
checkAndBindMetrics(registry);
scheduler.scheduleAtFixedRate(() -> checkAndBindMetrics(registry), REFRESH_INTERVAL_MILLIS,
REFRESH_INTERVAL_MILLIS, TimeUnit.MILLISECONDS);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants