Closed deadtrickster closed 7 years ago
Would a solution to https://github.com/elli-lib/elli/issues/3 help here? I'll leave this to you to merge.
So I think this is usable enough and we can merge and move on. Let me know if you want to discuss metrics
Merging sounds good to me. Maybe you could add a simple example somewhere.
Finally merged!
DO NOT MERGE
Metrics for 'normal' requests
http_requests_total
, counter. Total count of requests;http_request_duration_microseconds
, histogram. The difference betweenrequest_end
andrequest_start
;http_request_headers_microseconds
, histogram. The difference betweenheaders_end
andheaders_start
;http_request_body_microseconds
, histogram. The difference betweenbody_end
andbody_start
;http_request_user_microseconds
, histogram. The difference betweenuser_end
anduser_start
;http_request_send_microseconds
, histogram. The difference betweensend_end
andsend_start
;http_response_size_bytes
, summary. Total size of the response, includes headers, body|file|chuncks;http_response_headers_size_bytes
, summary. Size of the response headers;http_response_body_size
, summary. Size of the response body.Metrics for failed requests (network timeouts, malformed headers, etc)
http_requests_failed_total{reason}
, Total count of failed requests. Reasons:request_closed
- the client closes the connection when Elli is waiting for the next request;request_timeout
- the client times out when Elli is waiting for the request;request_parse_error
- the request is invalid and cannot be parsed or it contains a path Elli cannot parse or doesn't support;client_closed
- the client closes the connection or socket closed unexpectedly;client_timeout
- data can't be received within a timeout;bad_request
- Elli detects a request isn't well formatted or doesn't conform to the configured limits.http_bad_requests_total{reason}
- Total count ofbad_request
errors. Reasons:too_many_headers
;body_size
.http_client_closed_total{request_part}
- Total count ofclient_closed
errors. Parts:receiving_headers
;receiving_body
;before_response
.http_client_timeout_total{request_part}
Total count ofclient_timeout
errors. Parts:receiving_headers
;receiving_body
.