From 582e0a32d35278a4da4ecbb082ef03f4b6770e39 Mon Sep 17 00:00:00 2001 From: Lili Cosic Date: Tue, 15 Oct 2024 14:16:39 +0200 Subject: [PATCH] examples: Follow best practices and established naming conventions This is a nitpick but from my experience and understanding the best practice for label key naming is to use one word, otherwise using an underscore. Since this is an example users tend to copy, I think correcting it might be a good idea. Signed-off-by: Lili Cosic --- examples/customlabels/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/customlabels/main.go b/examples/customlabels/main.go index fcfce29..966544a 100644 --- a/examples/customlabels/main.go +++ b/examples/customlabels/main.go @@ -33,7 +33,7 @@ func main() { // Create a new registry. reg := prometheus.NewRegistry() - prometheus.WrapRegistererWith(prometheus.Labels{"serviceName": "my-service-name"}, reg).MustRegister( + prometheus.WrapRegistererWith(prometheus.Labels{"service": "my-service-name"}, reg).MustRegister( collectors.NewGoCollector(), collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}), )