client_rust icon indicating copy to clipboard operation
client_rust copied to clipboard

feat(encoding): new `encode_registry` and `encode_end` functions to compose cross-registry responses

Open amunra opened this issue 2 years ago • 10 comments

New encode_registry and encode_end functions allow encoding only parts of the response.

This is useful when there are multiple registries at play, or when composing metrics for a process that embeds Rust as part of its logic whilst serving metrics to Prometheus outside of Rust.

Closes https://github.com/prometheus/client_rust/issues/153


I wish to waive any ownership rights for the changes included in this PR and I'm happy for you to license these changes in any way you see fit, including the MIT and Apache licenses. Once accepted these changes are of your ownership.

amunra avatar Jul 13 '23 19:07 amunra

@mxinden are the comments requested changes for @amunra ?

hdost avatar Oct 26 '23 05:10 hdost

Yes, sorry. I still need to get around to finishing this. I am actively workings on metrics that will require this PR. Sorry for the delay!

amunra avatar Oct 26 '23 07:10 amunra

Changes are now ready for re-reviewing. Thanks for your feedback!

amunra avatar Nov 08 '23 15:11 amunra

@mxinden Hi Max, I hope you don't mind pinging you :-). I'm hoping to see this merged: Let me know if there's anything else that would need changing.

amunra avatar Nov 15 '23 09:11 amunra

@mxinden Sorry for the delay, I was away on holiday. Updated as per your suggestions.

amunra avatar Dec 04 '23 11:12 amunra

Note that you are missing the DCO sign-off. Would you mind either signing off each of your commits, or squashing into a single signed-off commit? Either way, this pull request will be squashed into master.

mxinden avatar Dec 04 '23 15:12 mxinden

Note that you are missing the DCO sign-off. Would you mind either signing off each of your commits, or squashing into a single signed-off commit? Either way, this pull request will be squashed into master.

I have no idea what that means. Would you have a list of commands for me to run or a web page to refer me to?

amunra avatar Dec 04 '23 21:12 amunra

@amunra sorry for the incomplete message and the delay.

You have a set of instructions when you click Details on the last (failing) CI action called "DCO". Or you can click the link below.

https://github.com/prometheus/client_rust/pull/154/checks?check_run_id=19282972846

I am sorry for the inconvenience this is causing. I know it is annoying.

mxinden avatar Jan 26 '24 12:01 mxinden

@amunra Hello! 🐱

Thanks for this feature! I was wondering if there's any update to this, as I have a usecase (described here #204) that could use this.

tyrone-wu avatar Jun 25 '24 18:06 tyrone-wu

Hello,

I'll be honest here: I'm pretty bogged down with quite a number of other items of work and I'll doubt I'll realistically get around to ever understanding/completing the DCO bureaucracy around this PR to be able to get it into a mergeable state.

If anyone else has the energy to create a new PR I get the feeling that the @mxinden will likely accept the change (or at least I hope) since it's effectively code + test + review -complete.

I'm sorry I'm leaving this 98% done, but I don't have the mental energy necessary here.

I waive any rights / attribution etc over the code changes here (as I also mentioned in the PR description).

Any help to get this over the finish line would be most welcome and I thank in advance.

amunra avatar Jun 25 '24 23:06 amunra