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(promtail): prevent panic due to duplicate metric registration after reloaded #10798

Merged

Conversation

hainenber
Copy link
Contributor

What this PR does / why we need it:
Prevent Promtail panicking after getting reloaded.

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

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR

@hainenber hainenber requested a review from a team as a code owner October 5, 2023 17:11
@hainenber hainenber force-pushed the fix-panic-when-reloading-promtail branch from 992996e to 06c3818 Compare October 5, 2023 17:12
@hainenber hainenber changed the title feat(promtail): prevent panic due to duplicate metric registration after reloaded fix(promtail): prevent panic due to duplicate metric registration after reloaded Oct 7, 2023
@MichelHollands MichelHollands merged commit 47e2c58 into grafana:main Oct 12, 2023
4 checks passed
@hainenber hainenber deleted the fix-panic-when-reloading-promtail branch October 12, 2023 15:49
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
…er reloaded (grafana#10798)

**What this PR does / why we need it**:
Prevent Promtail panicking after getting reloaded.

**Which issue(s) this PR fixes**:
Fixes grafana#10796 

**Special notes for your reviewer**:

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](grafana@d10549e)

---------

Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com>
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: panic: duplicate metrics collector registration attempted (loki_push_api)
2 participants