-
Notifications
You must be signed in to change notification settings - Fork 2
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
Instrument daemon with metrics #14
Conversation
This adds prometheus metrics to the daemon implementation giving insights into how they run.
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.
So probes
seems like an alternative naming to the Reporter
I introduced in the tcpchecker
package? Or is it something else?
Anyway it looks good 👍
Logger: logger, | ||
Probes: &daemon.Probes{ | ||
Started: func(time.Duration) { | ||
t.Log("Daemon started") |
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.
Would be nice with the started
, stopped
, etc. as a field in the log.
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.
In a test?
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've added a state
field to the main logs instead with values started
and stopped
.
You're right. This really is just a reporter. I'll rename it. |
This change adds prometheus metrics to the daemon implementation giving insights
into how they run.