swift-server / swift-prometheus

Prometheus client library for Swift
https://swiftpackageindex.com/swift-server/swift-prometheus
Apache License 2.0
142 stars 30 forks source link

Add missing call to label customization closure for meter #111

Closed simonjbeaumont closed 6 months ago

simonjbeaumont commented 6 months ago

Motivation

The PrometheusMetricsFactory has a nameAndLabelSanitizer closure property to customize the name and labels used by callers of the Swift Metrics API. This wasn't being called in makeMeter.

Modifications

Call nameAndLabelSanitzer in makeMeter, like in the other factory methods.

Result

All factory methods use the customization closure, nameAndLabelSanitizer.

ktoso commented 6 months ago

@swift-server-bot test this please