Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End Prometheus stats with a new line separator #826

Merged
merged 1 commit into from
Sep 22, 2024
Merged

End Prometheus stats with a new line separator #826

merged 1 commit into from
Sep 22, 2024

Conversation

MrSerth
Copy link
Contributor

@MrSerth MrSerth commented Sep 22, 2024

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.

According to the [OpenMetrics specification](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#overall-structure), 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.
@drdrsh
Copy link
Collaborator

drdrsh commented Sep 22, 2024

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

@MrSerth
Copy link
Contributor Author

MrSerth commented Sep 22, 2024

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

@drdrsh drdrsh merged commit 3935366 into postgresml:main Sep 22, 2024
1 check passed
@MrSerth MrSerth deleted the prometheus-line-separator branch September 22, 2024 22:17
@MrSerth
Copy link
Contributor Author

MrSerth commented Oct 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants