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

feat: add metric prefix config and expose metricCollectors #106

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

Abdulsametileri
Copy link
Member

If one application uses multiple kafka konsumer instances, they cannot use Prometheus metrics because they have collusion, their names are same. To prevent this kind of situation, we enable a metricPrefix config.

In prometheus, it is not possible to register exact two metrics. Prometheus gives panic: duplicate metrics collector registration attempted error message.

Copy link

codecov bot commented Feb 18, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (bce9002) 41.56% compared to head (e499f42) 43.31%.

Files Patch % Lines
consumer_base.go 0.00% 7 Missing ⚠️
collector.go 85.00% 3 Missing ⚠️
batch_consumer.go 0.00% 2 Missing ⚠️
consumer.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v2     #106      +/-   ##
==========================================
+ Coverage   41.56%   43.31%   +1.75%     
==========================================
  Files          19       19              
  Lines         729      741      +12     
==========================================
+ Hits          303      321      +18     
+ Misses        415      409       -6     
  Partials       11       11              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Abdulsametileri Abdulsametileri merged commit a73ddbe into v2 Feb 18, 2024
6 checks passed
@Abdulsametileri Abdulsametileri deleted the feature/metric-collector-and-prefix branch February 18, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant