t-rex-tileserver / t-rex

t-rex is a vector tile server specialized on publishing MVT tiles from your own data
https://t-rex.tileserver.ch/
MIT License
556 stars 69 forks source link

Stats from production runs #251

Open joto opened 3 years ago

joto commented 3 years ago

I see that statistics collection is already built into t-rex, but it is only exposed in the drilldown command. I would like to get the statistics also in normal production so that I can continually track stats and see when there are regressions after changes etc.

I am not sure yet what the best format is. For the time being maybe having an extra (csv) log file that logs the stats would be okay, medium term we could add fancy things like putting the stats into special databases or whatever.

pka commented 3 years ago

Would you expect these runtime statistics also on defined points (like drilldown), or in other tiles as well?

My favorite solution would be an instrumentation providing an endpoint with Prometheus metrics.

joto commented 3 years ago

Would you expect these runtime statistics also on defined points (like drilldown), or in other tiles as well?

I think the stats should be generated for all tiles. If you only want it at defined points, drilldown is fine. But there is always the problem that the planet (and the data) is not homogenous, so what might work well on one part of the planet might be slow on other parts.

My favorite solution would be an instrumentation providing an endpoint with Prometheus metrics.

Good for Prometheus users, not so good for others. Maybe we can define some kind of interface in the code where people can plug into? Not sure if it is worth the effort though.