-
Notifications
You must be signed in to change notification settings - Fork 12
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
Document Prometheus metics #750
Conversation
Implementation based on parsing Desc.String() output due to lack of proper APIs. Things could have been easier but Scanf is confused with {},.
Print prometheus metrics as JSON to stderr. We use stderr to avoid conflict with logs.
|
||
Labels: | ||
- host | ||
### `forwarder_dialer_dialed_total` |
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 have an empty line between labels and new metric. It does not matter in the final md output, yet it just feels better.
} | ||
|
||
fmt.Fprintf(f, "---\n") | ||
fmt.Fprintf(f, "title: Metrics\n") |
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.
Let's also add id: cmd.Name() +"metrics"
. It's needed for sc docs.
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.
LGTM
Sample page