-
Notifications
You must be signed in to change notification settings - Fork 379
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
pkg/metrics: add common go&gRPC prometheus metrics #1416
pkg/metrics: add common go&gRPC prometheus metrics #1416
Conversation
331d228
to
e34cb59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for tackling this @Jack-R-lantern!
Could we register common collectors directly inside InitAllMetrics
instead of defining a separate wrapper package for each of them? These extra packages seem unnecessary.
@lambdanis sure! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more request about pkg structure.
It seems that vendor check fails in CI, can you run make vendor
once again?
pkg/metrics/buildinfo/buildinfo.go
Outdated
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright Authors of Tetragon | ||
|
||
package buildinfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this file under pkg/version/metrics.go
instead of defining a new package here? I think it fits there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lambdanis that's good idea, thanks feedback
- add NewGoCollector - add NewProcessCollector - add NewServerMetrics - add pkg/version/metrics.go - buildInfoCollector - update go.mod, go.sum - update vendor Signed-off-by: Jack-R-lantern <tjdfkr2421@gmail.com>
e34cb59
to
a8aa8e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks
Fixed: #1406
metric result