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

Instrument daemon with metrics #14

Merged
merged 4 commits into from
Feb 6, 2020
Merged

Conversation

Crevil
Copy link
Member

@Crevil Crevil commented Feb 6, 2020

This change adds prometheus metrics to the daemon implementation giving insights
into how they run.

This adds prometheus metrics to the daemon implementation giving insights into
how they run.
Copy link
Contributor

@emilingerslev emilingerslev left a 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")
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

In a test?

Copy link
Member Author

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.

@Crevil
Copy link
Member Author

Crevil commented Feb 6, 2020

You're right. This really is just a reporter. I'll rename it.

@Crevil Crevil merged commit 606b24f into master Feb 6, 2020
@Crevil Crevil deleted the feature/instrumented-daemon branch February 6, 2020 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants