fix(gen/metrics): duplicate generated in metrics.md (#5837)

This commit is contained in:
vflaux 2025-09-21 11:18:13 +02:00 committed by GitHub
parent f7793950cc
commit 1300a6a339
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,7 @@ import (
"fmt"
"os"
"reflect"
"slices"
"sort"
"strings"
"text/template"
@ -71,6 +72,7 @@ func generateMarkdownTable(m *metrics.MetricRegistry, withRuntime bool) (string,
"process_network_transmit_bytes_total",
}...)
sort.Strings(runtimeMetrics)
runtimeMetrics = slices.Compact(runtimeMetrics)
} else {
runtimeMetrics = []string{}
}