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 libmetric metric for each logged log message #4055

Merged
merged 4 commits into from
Apr 25, 2023

Conversation

problame
Copy link
Contributor

This patch extends the libmetrics logging setup functionality with a tracing layer that increments a Prometheus counter each time we log a log message. We have the counter per tracing event level. This allows for monitoring WARN and ERR log volume without parsing the log. Also, it would allow cross-checking whether logs got dropped on the way into Loki.

It would be nicer if we could hook deeper into the tracing logging layer, to avoid evaluating the filter twice.
But I don't know how to do it.

This shouldn't change anything at the functional level.
In the next patch, we'll add another subscriber, using another `.with()` call.
@problame problame added the a/observability Area: related to observability label Apr 21, 2023
@github-actions
Copy link

github-actions bot commented Apr 21, 2023

Test results for 16b2658:


debug build: 219 tests run: 209 passed, 0 failed, 10 (full report)


release build: 219 tests run: 209 passed, 0 failed, 10 (full report)


Copy link
Contributor

@koivunej koivunej left a comment

Choose a reason for hiding this comment

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

Looking good. I hope we could shave off the python test and everything related to it.

@problame problame marked this pull request as ready for review April 25, 2023 12:10
@problame problame requested review from a team as code owners April 25, 2023 12:10
@problame problame requested review from funbringer and SomeoneToIgnore and removed request for a team April 25, 2023 12:10
@problame problame merged commit e83684b into main Apr 25, 2023
26 checks passed
@problame problame deleted the problame/log-level-counter-metrics branch April 25, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/observability Area: related to observability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants