export metrics without units

This commit is contained in:
pascal
2026-04-09 12:46:45 +02:00
parent 099c493b18
commit 7f98cf30cf
5 changed files with 26 additions and 16 deletions

View File

@@ -206,7 +206,9 @@ func (appMetrics *defaultAppMetrics) GetMeter() metric2.Meter {
// NewDefaultAppMetrics and expose them via defaultEndpoint on a given HTTP port
func NewDefaultAppMetrics(ctx context.Context) (AppMetrics, error) {
exporter, err := prometheus.New()
exporter, err := prometheus.New(
prometheus.WithoutUnits(),
)
if err != nil {
return nil, fmt.Errorf("failed to create prometheus exporter: %w", err)
}