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 <cosiclili@gmail.com>
This commit is contained in:
parent
9c67f6190c
commit
582e0a32d3
|
@ -33,7 +33,7 @@ func main() {
|
||||||
|
|
||||||
// Create a new registry.
|
// Create a new registry.
|
||||||
reg := prometheus.NewRegistry()
|
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.NewGoCollector(),
|
||||||
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
|
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue