Skip to content

docs: Prometheus metrics + generator #5179

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

Merged
merged 20 commits into from
Nov 30, 2022
Prev Previous commit
Next Next commit
gosec
  • Loading branch information
mtojek committed Nov 29, 2022
commit 30fd2d139f51531d5971b27b1c8bf4a19ec1f058
2 changes: 2 additions & 0 deletions scripts/metricsdocgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ func updatePrometheusDoc(doc []byte, metricFamilies []dto.MetricFamily) ([]byte,
}

func writePrometheusDoc(doc []byte) error {
// G306: Expect WriteFile permissions to be 0600 or less
/* #nosec G306 */
err := os.WriteFile(prometheusDocFile, doc, 0644)
if err != nil {
return err
Expand Down