Skip to content

Commit b99524c

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.
1 parent 9c67f61 commit b99524c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/customlabels/main.go

Lines changed: 1 addition & 1 deletion
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)