feat(encoding): new `encode_registry` and `encode_end` functions to compose cross-registry responses
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.
@mxinden are the comments requested changes for @amunra ?
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!
Changes are now ready for re-reviewing. Thanks for your feedback!
@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.
@mxinden Sorry for the delay, I was away on holiday. Updated as per your suggestions.
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.
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 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.
@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.
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.