grpc: add request related metrics#4811
Merged
MrAnno merged 5 commits intosyslog-ng:masterfrom Feb 6, 2024
Merged
Conversation
Collaborator
|
I reviewed the code and it looks good to me. Just one question: this registers all the counters at startup, unlike http (I think), which only registers them if they are encountered. would it be possible to defer the registration, so we don't have to collect all these metrics unless they are actually non-zero? |
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Feb 5, 2024
Signed-off-by: Attila Szakacs <[email protected]>
7a2138d to
a653d19
Compare
Collaborator
Author
|
@bazsi Yes, I implemented that in the latest iteration. |
Iimplementing this with composition in each gRPC related dest driver is suboptimal. The clean thing would be to have a common gRPC related dest driver, which already does handles metrics, and the otel, bigquery and loki drivers should descend from it. Unfortunately doing that would be a huge task right now. IMO this should suffice for now, but we should really clean up the class hierarchy sometime later. Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
Signed-off-by: Attila Szakacs <[email protected]>
a653d19 to
4935ddc
Compare
alltilla
added a commit
to alltilla/syslog-ng
that referenced
this pull request
Feb 5, 2024
Signed-off-by: Attila Szakacs <[email protected]>
MrAnno
approved these changes
Feb 6, 2024
This file contains hidden or 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
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.
Implementing this with composition in each gRPC related dest driver is suboptimal.
The clean thing would be to have a common gRPC related dest driver, which already does handle metrics, and the otel, bigquery and loki drivers should descend from it. Unfortunately doing that would be a huge task right now.
IMO this should suffice for now, but we should really clean up the class hierarchy sometime later.
Affected drivers:
opentelemetry()syslog-ng-otlp()bigquery()loki()Example metrics: