Max Inden

Results 899 comments of Max Inden

As a first iteration, I suggest we support synchronous `Collector::collect` only. 1. For those that need to call `async` methods in their `Collector::collect` call, I suggest you spawn the `encode`...

@kwiesmueller Thanks for sharing. Let me know in case the threading approach is good enough for you for now, i.e. can collect from the many datasources you are targeting within...

I rebased this pull request onto https://github.com/prometheus/client_rust/pull/100. Everything compiles, tests succeed. To me the above validates that we should move forward with https://github.com/prometheus/client_rust/pull/100. That said, I do think the signatures...

I am in favor of this. Given that `Histogram` is `Clone`, `Send` and `Sync`, I don't think this change will be intrusive. > Happy to implement this myself. Great. Thank...

> The problem domain we have here is basically the same as `serde`'s, thus I think the ideal solution might be a visitor pattern with an abstract data model. >...

:+1: for not adopting `serde`. Thanks for walking me through this. Appreciate the elaborate post above. I like the idea of a single `EncodeMetric` trait which is then used by...

> With saying that, could we get away with having an enum of all metrics and store that without boxing? :) Unfortunately not. Or I don't know how to do...

> So a `Family` could just contain the enum again, right? It is a recursive structure like `serde_json::Value`. Correct. > Do we need to be generic over all atomics? Maybe....

> ```rust > impl Encode for Counter { > fn encode(&mut, encoder: &mut E) where E: Encoder -> Result { > let mut counter_encoder = encoder.start_encoder_counter(); > > counter_encoder.add_labels(&["foo"]).set_int_value(self.value).finish() >...

While I do see value in users being able to bring their own metrics, I don't think users will bring their own output format. Thus we can likely get around...