Skip to content

Encoder without EOF #153

@amunra

Description

@amunra

Hello!
I have a more uncommon use case where I'm using Rust in a multi-language setup.

The rest of the system is already serving requests to Prometheus and I'd like to slot in a few metrics for the parts of my application written in Rust.

I like that the client doesn't do HTTP serving and stick to the protocol, so it's 99% of what I need.

What causes me trouble is just a single line of code:

    writer.write_str("# EOF\n")?;

which prevents me from using this crate in a way that's composable with other output.

Would you consider a variant of the encode function that doesn't write out the # EOF?

Maybe called pub fn encode_metrics?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions