Skip to content

Commit 582e0a3

Browse files
committed
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 <[email protected]>
1 parent 9c67f61 commit 582e0a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/customlabels/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func main() {
3333

3434
// Create a new registry.
3535
reg := prometheus.NewRegistry()
36-
prometheus.WrapRegistererWith(prometheus.Labels{"serviceName": "my-service-name"}, reg).MustRegister(
36+
prometheus.WrapRegistererWith(prometheus.Labels{"service": "my-service-name"}, reg).MustRegister(
3737
collectors.NewGoCollector(),
3838
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
3939
)

0 commit comments

Comments
 (0)