Skip to content

Commit

Permalink
Fix docs sorting of metrics and recording rules
Browse files Browse the repository at this point in the history
Signed-off-by: João Vilaça <jvilaca@redhat.com>
  • Loading branch information
machadovilaca committed Jan 9, 2024
1 parent 992afaa commit 1643dc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/docs/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func BuildMetricsDocsWithCustomTemplate(
allDocs = append(allDocs, buildMetricsDocs(recordingRules)...)
}

sortMetricsDocs(allDocs)

buf := bytes.NewBufferString("")
err = tpl.Execute(buf, allDocs)
if err != nil {
Expand All @@ -89,7 +91,6 @@ func buildMetricsDocs[T docOptions](items []T) []metricDocs {
ExtraFields: metricOpts.ExtraFields,
}
}
sortMetricsDocs(metricsDocs)

return metricsDocs
}
Expand Down

0 comments on commit 1643dc4

Please sign in to comment.