zio / zio-metrics-connectors

Monitoring, Metrics and Diagnostics for ZIO
https://zio.dev/zio-metrics-connectors
Apache License 2.0
30 stars 24 forks source link

Remove trailing comma from labels in prometheus encoding #62

Closed erikvanoosten closed 8 months ago

erikvanoosten commented 8 months ago

Here is an example line from the prometheus encoding:

summary{error="0.03",quantile="0.1",} 138.0625

According to the prometheus text based format the trailing comma should not be there.

erikvanoosten commented 8 months ago

Hi @petoalbert . I think you are right. I had not looked at the BNF expression too closely, I mostly looked at the examples. But indeed, on closer inspection there is indeed an optional comma at the end.

BTW, no, I didn't actually use this project yet (I will soon) so I did not experience any compatibility problems.

petoalbert commented 8 months ago

Okay, anyway I'll merge this because not having a trailing comma is cleaner in my opinion. I am happy to hear that you will use this project. 🙂