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

Fix duplicate registry.MustRegister call in Promtail Kafka #4866

Merged
merged 2 commits into from
Dec 3, 2021

Conversation

taisho6339
Copy link
Contributor

@taisho6339 taisho6339 commented Dec 3, 2021

What this PR does / why we need it:

registry.MustRegister is called every newPipeline and newPipeline is called in every newTarget in target_syncer.go.
Therefore MustRegister is called in duplicate and it causes the metrics collection error.
I've moved the newPipeline to newTargetsyncer to fix it.

Which issue(s) this PR fixes:
Fixes #4865

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

@taisho6339 taisho6339 requested a review from a team as a code owner December 3, 2021 04:56
* registry.MustRegister is called every newPipeline so ensure it only at once
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @taisho6339 🙏
Let's wait for @cyriltovena to confirm before merging

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyriltovena cyriltovena merged commit 77dcb16 into grafana:main Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Promtail] Duplicate prometheus register call when using Kafka
3 participants