Open
Description
Database Performance Metrics
Right now, we serve a good number of metrics for understanding writes and queries. But we need to track a few missing pieces. Primarily, we need to add the database as a parameter to the outputs as that'll help us better understand if specific databases are being hammered more than others.
Update the /metrics
endpoint to serve the following metrics:
New Metrics:
- http_request_active: Total number of currently active requests, per database.
Update Metrics:
- http_request_duration_seconds_[sum,bucket,count]: Add database as parameter
- http_response_body_size_bytes_[sum,bucket,count]: Add database as parameter
- http_requests_total: Add database as parameter
New Endpoint Parameters:
Right now we're only tracking the v2 and v3 endpoints for writes and queries. We should include v1 endpoints to ensure we're capturing all info. We don't have to worry about ping
or debug
endpoints for v1.
For example, we current have:
http_request_duration_seconds_sum{method="POST",method_path="POST /api/v2/write",path="/api/v2/write",status="ok"}
Let's add one for the v1 write endpoint as well.
http_request_duration_seconds_count{method="POST",method_path="POST /write",path="//write",status="ok"}
Updated Endpoints
- All versions of http_request_duration_seconds_[sum,bucket,count]: Add /write, /query endpoints
- All versions of http_response_body_size_bytes_[sum,bucket,count]: Add /write, /query endpoints
- All versions of http_requests_total: Add /write, /query endpoints