stable

Clone or download

Read-only

request #12544 Add http request duration instrumentation

As it's far from trivial to do that with Prometheus (there are no data type for duration), it should be done with an histogram type (or summary but its more complex, lets start with summary). That means we should define an histogram of possible values (buckets) and then prom will keep track of the number of requests that matched each category. Here I picked values out of my mind of what would be interesting to know in term of distribution of values: * 50ms * 100ms * 200ms * 500ms * 1s * 2s * 5s * 10s * 30s But it's very possible that those values are not representative at all of the actual request duration but it's not possible to know until it's deployed. Another concern might be "how representative it is given that you track both tracker report rendering and display of news admin in the same metric ?". That's a fair comment but, on a more high level what we want to observe here is how the web app behaves globally. If most if not all requests are in the 5s - 10s range it's not the same thing than 500ms - 1s and might help to fact check "application is globally slow" vs "there are some slow pages". All in all, the only way to know if this is useful is to deploy and observe. Change-Id: If724310444962a2c69c3ea42cc003e16f2217c27

Modified Files

Name
M src/common/Instrument/Prometheus/Prometheus.php +37 −0 Go to diff View file
M src/common/Request/RequestInstrumentation.php +15 −3 Go to diff View file