-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.
Milestone
Description
This Issue will detail the follow up suggestions that need to be implemented and/or discussed:
Follow up for: #6114:
- Add link to the metrics doc to the main README.
- Add condition to the log message to be more specific, like "webhook and metrics" where apt, or just "with webhooks".
- Update metricsdocs file to use Go template instead of creating a whole bunch of constants. Example template:
const metricsTemplate = `# Operator Metrics
This document aims to help users that are not familiar with metrics exposed by this operator.
The metrics documentation is auto-generated by the utility tool \"monitoring/metricsdocs\" and reflects all of the metrics that are exposed by the operator.
## Operator Metrics List
{{range .}}
### {{.Name}}
**Description:** {{.Description}}
**Type**: {{.Type}}
{{end}}
## Developing new metrics
After developing new metrics or changing old ones, please run \"make generate-metricsdocs\" to regenerate this document.
If you feel that the new metric doesn't follow these rules, please change \"monitoring/metricsdocs\" according to your needs.
Then you can render this template by running something like:
tmpl := template.New("Operator metrics")
tmpl, err := tmpl.Parse(metricsTemplate)
// handle error
out := &bytes.Buffer{}
mList := metricList{}
err = tmpl.Execute(out, mList)
// handle error
- Moving the common generator code to a library. The generator should live in the operator project, but its helpers can still can be moved to a common place.
Metadata
Metadata
Assignees
Labels
help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.Categorizes issue or PR as related to documentation.priority/backlogHigher priority than priority/awaiting-more-evidence.Higher priority than priority/awaiting-more-evidence.