cfmack / pRometheus

Prometheus Client Library for R and Plumber
MIT License
21 stars 5 forks source link

Implement Feedback from Prometheus Documentation #4

Closed cfmack closed 4 years ago

cfmack commented 4 years ago

Are you checking that the passed label values match up to the label names? Are you checking that label values are valid UTF-8?

It's odd to have namespace without subsystem, and these days we're tending towards having neither and just relying on name.

You shouldn't need a getGauge call, that's an anti-pattern. Have users remember the gauge's address when they create it: https://www.robustperception.io/label-lookups-and-the-child

What is type used for? It seemed unused, and is confusing naming in that Prometheus client libraries already have types such as gauge and counter.

cfmack commented 4 years ago

What is type used for? It seemed unused, and is confusing naming in that Prometheus client libraries already have types such as gauge and counter.

Corrected in Gauge implementation

cfmack commented 4 years ago

Are you checking that the passed label values match up to the label names?

It is now

cfmack commented 4 years ago

Are you checking that label values are valid UTF-8?

It is now

cfmack commented 4 years ago

Have users remember the gauge's address when they create it

Moved this to #7