Enhance InfluxDB
Supersedes #130 (closed).
One of the biggest issues when handling InfluxDB was the metrics compactor, it's a complicated piece of code.
After digging deeper I accidentally found the Downsampling and data retention section of the InfluxDB documentation, guess what: it does exactly what I wrote in 325 lines of heavy-logic code.
I think we can keep on this instead of prometheus. I think we can do some really interesting things.
- Add tags to the request/response/response latency measurements,
route=<method>_<api_path>
for both,status_code=<status_code>
for responses- Would enable us to peek at total upload latency really easily, without custom code, I think that's epic.
- Same as cutting down on the
error
anderror_ise
counters, since we can do the same thing (and more!) viastatus_code
- Cuts down on
file_upload_hour
/file_upload_hour_pub
counters, as we can write a query to get all responses to/api/upload
that arestatus_code=200
.
- Split the code that does all of this and put it into an external resuable library.