pushy icon indicating copy to clipboard operation
pushy copied to clipboard

Consider making the MicrometerApnsClientMetricsListener a MeterBinder

Open filiphr opened this issue 6 years ago • 2 comments

I am not that well versed in Micrometer. However, I noticed that if I want to use Spring Boot and provide the MicrometerApnsClientMetricsListener as a bean then I need to inject the MeterRegistry and if this is in an auto configuration I need to make sure the ordering and everything. If the bean is a MeterBinder then Spring Boot will automatically the bindTo method.

Is this something that would be interesting for the Pushy team?

filiphr avatar Jan 29 '19 17:01 filiphr

Yes, that makes a lot of sense. I, too, am very new to Micrometer and didn't know about MeterBinder until just now. I can just take care of that as part of whatever fix happens for #666.

jchambers avatar Jan 30 '19 00:01 jchambers

Wow—it's been nearly five years since this issue was opened. Time flies.

Two important things have happened in the meantime:

  1. I've gained significant real-world experience with Micrometer and
  2. Based on that, I've proposed a significant overhaul to the Micrometer metrics listener in #1046.

Unfortunately, I think a consequence of the Micrometer overhaul is that making the listener a MeterBinder no longer makes sense. Rather than having a static set of meters that will be known at construction time, we'll have a bunch of dynamically-tagged meters that we'll "discover" at runtime. It's not immediately clear to me if that's in keeping with the spirit of MeterBinder, but I'll read more (and ask some questions) to see what I can figure out.

jchambers avatar Jan 01 '24 00:01 jchambers