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

Add unwrapped aggregation rate_counter() #6412

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

chaudum
Copy link
Contributor

@chaudum chaudum commented Jun 16, 2022

What this PR does / why we need it:

rate_counter() takes an unwrapped range as input, but unlike rate()
it treats the values extracted from the log lines as "counter metric"
like in Prometheus' rate() function.

This is a replacement for the reverted change of #5013

Special notes for your reviewer:

Part to of the implementation of #6351

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

`rate_counter()` takes an unwrapped range as input, but unlike `rate()`
it treats the values extracted from the log lines as "counter metric"
like in Prometheus' `rate()` function.

This is a replacement for the reverted change of #5013

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
@@ -9,7 +9,6 @@
* [6372](https://github.com/grafana/loki/pull/6372) **splitice**: Add support for numbers in JSON fields
* [6105](https://github.com/grafana/loki/pull/6105) **rutgerke** Export metrics for the promtail journal target
* [6179](https://github.com/grafana/loki/pull/6179) **chaudum**: Add new HTTP endpoint to delete ingester ring token file and shutdown process gracefully
* [6099](https://github.com/grafana/loki/pull/6099/files) **cstyan**: Drop lines with malformed JSON in Promtail JSON pipeline stage
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Duplicate changlog entry (line 5)

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
- querier/queryrange	-0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

@owen-d owen-d merged commit a56a88b into main Jun 16, 2022
@owen-d owen-d deleted the chaudum/rate-counter-aggregation branch June 16, 2022 20:16
@ssncferreira ssncferreira added the backport release-2.6.x Tag a PR with this label to create a PR which cherry pics it into the release-2.6.x branch label Jun 30, 2022
grafanabot pushed a commit that referenced this pull request Jun 30, 2022
`rate_counter()` takes an unwrapped range as input, but unlike `rate()`
it treats the values extracted from the log lines as "counter metric"
like in Prometheus' `rate()` function.

This is a replacement for the reverted change of #5013

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit a56a88b)
ssncferreira added a commit that referenced this pull request Jun 30, 2022
* Add unwrapped aggregation `rate_counter()` (#6412)

`rate_counter()` takes an unwrapped range as input, but unlike `rate()`
it treats the values extracted from the log lines as "counter metric"
like in Prometheus' `rate()` function.

This is a replacement for the reverted change of #5013

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit a56a88b)

* Update CHANGELOG

Co-authored-by: Christian Haudum <christian.haudum@gmail.com>
Co-authored-by: Susana Ferreira <susana.ferreira@grafana.com>
@osg-grafana osg-grafana added type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories and removed area/docs labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-2.6.x Tag a PR with this label to create a PR which cherry pics it into the release-2.6.x branch size/XL type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants