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

Document Prometheus metics #750

Merged
merged 6 commits into from
Mar 21, 2024
Merged

Document Prometheus metics #750

merged 6 commits into from
Mar 21, 2024

Conversation

mmatczuk
Copy link
Contributor

@mmatczuk mmatczuk commented Mar 20, 2024

Sample page

image

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.
@mmatczuk mmatczuk requested a review from Choraden as a code owner March 20, 2024 15:13

Labels:
- host
### `forwarder_dialer_dialed_total`
Copy link
Contributor

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")
Copy link
Contributor

@Choraden Choraden Mar 21, 2024

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.

Copy link
Contributor

@Choraden Choraden left a comment

Choose a reason for hiding this comment

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

LGTM

@Choraden Choraden merged commit 5c80bb9 into main Mar 21, 2024
4 checks passed
@Choraden Choraden deleted the mmt/prom_docs branch March 21, 2024 12:36
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.

None yet

2 participants