Is using a CollectorRegistry really necessary?
Closed this issue · 5 comments
Just curious - in theory would it be possible to have a MetricsService
that pulls data straight from the twitter MetricsView
? You'd have to write a custom formatter rather than using TextFormat.write004()
, but on the plus side you could completely get rid of PrometheusStatsReceiver
...
Hey @caplan! That's a good question. I haven't come across MetricsView
, I have to admit. Let me have a look: getting rid of the PrometheusStatsReceiver
would be good, because that code is a little hairy these days.
I'm on holiday over the weekend, so I might not get much of a chance to look in the next few days, but I'd love to pick this up afterwards, so thanks for raising it.
At first glance it looks like MetricsView
is private.
oh duh, right... I guess twitter doesn't really want to expose aggregated metrics as an api :(
Hey @caplan: sorry it's been a while. I had a poke around Metrics
and (sadly) I didn't find a better way to do things, but you're right: a MetricsView
would make my life a lot easier! I'm going to close this for now, but please just let me know if you think I missed something.