Skip to content

add response duration metric historgram with buckets#92

Open
jakubgs wants to merge 1 commit into
masterfrom
add-response-duration-metric
Open

add response duration metric historgram with buckets#92
jakubgs wants to merge 1 commit into
masterfrom
add-response-duration-metric

Conversation

@jakubgs

@jakubgs jakubgs commented Apr 28, 2026

Copy link
Copy Markdown
Member

This way we can measure spread of latencies across multiple requests over time and not just duration time of the last request made.

Example:

# HELP presto_server_prepare_response_duration_seconds Histogram of HTTP response preparation duration, in seconds
# TYPE presto_server_prepare_response_duration_seconds histogram
presto_server_prepare_response_duration_seconds_sum{endpoint="GET/eth/v1/beacon/states/{state_id}/fork"} 1.028
presto_server_prepare_response_duration_seconds_count{endpoint="GET/eth/v1/beacon/states/{state_id}/fork"} 6.0
presto_server_prepare_response_duration_seconds_created{endpoint="GET/eth/v1/beacon/states/{state_id}/fork"} 1777402883.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="0.01"} 4.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="0.025"} 4.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="0.05"} 4.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="0.1"} 4.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="0.25"} 4.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="0.5"} 5.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="1.0"} 6.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="2.5"} 6.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="5.0"} 6.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="10.0"} 6.0
presto_server_prepare_response_duration_seconds_bucket{endpoint="GET/eth/v1/beacon/states/{state_id}/fork",le="+Inf"} 6.0

Personally I think presto_server_prepare_response_time metric is almost useless because high latency responses can be easily lost because the next set() call can reset the value back to a normal looking one.

Removing it entirely might be even better. Happy to do that if people agree.

This way we can measure spread of latencies across multiple requests
over time and not just duration time of the last request made.

Personally I think presto_server_prepare_response_time metric is almost
useless because high latency responses can be easily lost because the
next set() call can reset the value back to a normal looking one.

Removing it entirely might be even better.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
@jakubgs
jakubgs requested a review from cheatfate April 28, 2026 18:51
@jakubgs jakubgs self-assigned this Apr 28, 2026
@jakubgs

jakubgs commented Apr 28, 2026

Copy link
Copy Markdown
Member Author

I'm not sure how detailed we want the buckets, here's a more fine-grained example:

image

Not sure how valuable is the distinction between 1 ms and 10 ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant