- Metric Sources
- Using Instrumental
- Where to Start
Apdex and Request Metrics
Apdex is an open standard for reporting and comparing the performance of applications, specifically around meeting users' expectations. By way of Rack middleware, Metrician records metrics related to probably customer satisfaction.
Metrician has 4 configuration options that can be set in your copy of
metrician.yaml to report Apdex metrics. Apdex reporting is enabled by default.
:request_timing: :enabled: true :request: :enabled: true :apdex: :enabled: true :satisfied_threshold: 2.5
satisfied_threshold is a decimal number of seconds threshold before your users will go from “satisfied” to “tolerated”. At 4x that threshold (10s in this example), the user is considered to go from “tolerated” to “frustrated”. Increase or decrease this number if your application users are more or less tolerant of longer request times.
||average request time|
||avg request time for requests finished under the satisfied threshold|
||avg request time for requests finished between the satisfied and tolerated (4x) thresholds|
||avg request time for request over the tolerated threshold|
You can add an Apdex graph to your dashboard with the following expression:
series_clamp(0, 1, (gauge_count(app.web.apdex.satisfied) + (gauge_count(app.web.apdex.tolerated)/2))/gauge_count(app.web.request)) as apdex
Find out what percentage of your users were frustrated by adding a graph to your dashboard with the following expression:
gauge_count(app.web.apdex.frustrated) / gauge_count(app.web.request) * 100
Requests have a large number of separate components that make up the whole. Using our rack middleware (1, 2) your application can report metrics measuring web server queue time, idle time, total request time, exception counts, response sizes, and middleware times. For request time, error reporting, and response sizes, you can also record metrics per controller (in Rails).
The following are the default settings that control request metric reporting. By default, request and error reporting are enabled.
:request_timing: :enabled: true :request: :enabled: true :error: :enabled: true :idle: :enabled: false :response_size: :enabled: false :middleware: :enabled: false :queue_time: :enabled: false :route_tracking: :enabled: false
||average request time (ms)|
||count of 5xx errors|
||avg time (ms) web process waits between requests|
||avg size (bytes) of response|
||avg time (ms) spent processing middleware|
||avg time (ms) requests spend at web server (pre-application)|
request_tracking option is enabled, then you can also report request, error, and response size metrics per controller, action, and HTTP verb. For example, if you have a
PostsController with an
index action that is HTTP
GET'ed, you might see the following metrics:
app.web.error.posts_controller.index.get(when an exception is raised)
Add the following expression to a graph to see your request rate for a given resolution (RPM, RPH, etc.):
Add the following expression to a graph to see your web error rate percentage:
app.web.error / gauge_count(app.web.request) * 100