-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
chore: [k190] fix: promtail; clean up metrics generated from logs after a config reload. #12938
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grafanabot
added
backport
size/L
type/docs
Issues related to technical documentation; the Docs Squad uses this label across many repositories
labels
May 10, 2024
Snyk scan found the following vulnerabilities:
|
MasslessParticle
approved these changes
May 10, 2024
Trivy scan found the following vulnerabilities:
|
ptodev
added a commit
to grafana/alloy
that referenced
this pull request
May 13, 2024
thampiotr
pushed a commit
to grafana/alloy
that referenced
this pull request
May 14, 2024
* Update Loki dependency. * Clean up metrics generated from logs after a config reload. Synced from: grafana/loki#12938
ptodev
added a commit
to grafana/agent
that referenced
this pull request
May 14, 2024
ptodev
added a commit
to grafana/agent
that referenced
this pull request
May 15, 2024
ptodev
added a commit
to grafana/agent
that referenced
this pull request
May 15, 2024
* Update Loki dependency. * Clean up metrics generated from logs after a config reload. Synced from: grafana/loki#12938 * Update README
ptodev
added a commit
to grafana/agent
that referenced
this pull request
May 15, 2024
* Update Loki dependency. * Clean up metrics generated from logs after a config reload. Synced from: grafana/loki#12938 * Update README
ptodev
added a commit
to grafana/agent
that referenced
this pull request
May 15, 2024
* azure_exporter: Fix bug which prevents subscription scope from working with only a single region (#6719) * Update postgres exporter (#6780) * Update postgres exporter * Make collector work with first DSN * Enhance docs and test * Update depcheck * Update SNMP exporter (#6904) * Update SNMP exporter * Fix build issues * Update Windows exporter * Update Loki dependency (#6905) * Update Loki dependency. * Clean up metrics generated from logs after a config reload. Synced from: grafana/loki#12938 * Update README * Update changelog * Update loki dep to k190 (#6543) * Update loki dep to k190 * port renames * fix loki push api * Update vmware_exporter * Update prom encoder --------- Co-authored-by: kgeckhart <kgeckhart@users.noreply.github.com> Co-authored-by: Piotr <17101802+thampiotr@users.noreply.github.com>
ptodev
added a commit
that referenced
this pull request
Nov 22, 2024
…er a config reload. (#12938) Co-authored-by: Paulin Todev <paulin.todev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 39a7181 from #11882
It is possible to generate metrics from log lines in Promtail. If the config file is reloaded, those metrics are currently not cleaned up. This causes a few issues:
/metrics
endpoint.This will help us fix a bug reported in the Grafana Agent.
I suppose no changelog entry is required because PromQL is already designed to handle counter resets? But if you think it's appropriate, I could add a changelog entry?
I tested this change locally using a config file like this:
Promtail config
Then I'd do a
curl localhost:9080/reload
and checkhttp://localhost:9080/metrics
.I didn't add a whole lot of unit tests because TBH we should probably focus on adding tests in the Agent, given that we're sunsetting Promtail over time.