postgresml / pgcat

PostgreSQL pooler with sharding, load balancing and failover support.
MIT License
3.13k stars 193 forks source link

End Prometheus stats with a new line separator #826

Closed MrSerth closed 2 months ago

MrSerth commented 2 months ago

According to the OpenMetrics specification, each line MUST end with \n. Previously, the last line was not ending with \n, so that strict parsers had issues reading the Prometheus stats.

I did not add any tests since I am not too comfortable with Rust and pgCat. Feel free to continue my work in this regard.

drdrsh commented 2 months ago

Can you share the strict parser that you used? I am trying to verify that the fix works.

MrSerth commented 2 months ago

Sure: I am using telegraf. Telegraf also has an issue on GitHub detailing that problem: https://github.com/influxdata/telegraf/issues/10608

MrSerth commented 1 month ago

@drdrsh Would you mind to draft a new release? I would like to benefit from this and other improvements since 1.2.0.