Hi Joe,
I think you got the below quite right in general. The most relevant
prior discussion I know of is starting at this GH comment (hidden in
the issue about not using channels in the Collector interface):
https://github.com/prometheus/client_golang/issues/228#issuecomment-475214970
Fundamentally, I think the addition of contexts is straight forward
and indeed very desirable, for all the reasons you listed, and maybe
even more.
The reason why it hasn't happened yet is that it requires changes to
so many parts of the whole library. So we end up with a lot of very
similar almost-duplicates of functions/methods, which pollutes the
namespace, confuses the user, and is generally a design smell (in
particular in interfaces), all because we have to keep backwards
compatibility for this incredibly widely used library.
So the plan was to do it all in the glorious v2 rewrite (for which I
piled up a lot of those changes in design or additional features that
would require weird wrinkles to not make them breaking changes, see
the v2 milestone:
https://github.com/prometheus/client_golang/milestone/2 ).
However, for various reason, the progress on the v2 rewrite
stalled. We have new maintainers now (@bwplotka and @kakkoyon on GH),
and it's their call how to proceed here. My gut feeling is that they
tend to rather add more features to v1, even if it requires wrinkles,
than expedite a v2 rewrite. Perhaps they will follow up
here. Otherwise, try to get in touch with them is nome other
way. Maybe file a feature or start a discussion in GH.
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
prometheus-devel...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-developers/25a3ef44-6f02-492f-8f6c-28383cd0d6d8n%40googlegroups.com.
--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email]
bjo...@rabenste.in