-
Notifications
You must be signed in to change notification settings - Fork 337
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
feat(kuma-cp) metrics #993
Conversation
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
} | ||
|
||
func (h *SimpleDNSServer) parseQuery(m *dns.Msg) { | ||
for _, q := range m.Question { | ||
switch q.Qtype { | ||
case dns.TypeA: | ||
serverLog.Info("Query for " + q.Name) | ||
serverLog.V(1).Info("query for " + q.Name) |
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.
V(1)? we need it?
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.
I think it's overkill to log every DNS request on the info level. It's like with API Server, we don't request every single request. With many services that uses DNS, logs will be spammed with "Query for..."
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
Summary
This PR introduces Control Plane metrics:
It does not include dashboards.
Implementation
My first approach was to use
promauto
with global default Prometheus registry andMustRegister
that panic, but it was a disaster in tests, therefore I implicitly pass the registry in theMetric
object.I try to register metrics as "high" in
Setup
/component.go
etc. as possible. I was trying to avoid spreading Prometheus code across the codebase.For latencies, I try to use a Summary, not Histogram. You can read about the differences here https://prometheus.io/docs/practices/histograms/ as long as there is no aggregation, Histograms are just easier to use IMHO.
Documentation