Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty shotover_chain_latency metric #980

Merged
merged 5 commits into from Jan 9, 2023

Conversation

rukai
Copy link
Member

@rukai rukai commented Dec 22, 2022

Because the registered shotover_chain_latency metric cant specify the client ip it ends up as a separate metric that is always 0 which is quite confusing.
e.g.

# TYPE shotover_chain_latency summary
shotover_chain_latency{chain="example_chain",quantile="0"} 0
shotover_chain_latency{chain="example_chain",quantile="0.5"} 0
shotover_chain_latency{chain="example_chain",quantile="0.9"} 0
shotover_chain_latency{chain="example_chain",quantile="0.95"} 0
shotover_chain_latency{chain="example_chain",quantile="0.99"} 0
shotover_chain_latency{chain="example_chain",quantile="0.999"} 0
shotover_chain_latency{chain="example_chain",quantile="1"} 0
shotover_chain_latency_sum{chain="example_chain"} 0
shotover_chain_latency_count{chain="example_chain"} 0
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="0"} 0.000205255
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="0.5"} 0.00023099834016288915
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="0.9"} 0.00023099834016288915
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="0.95"} 0.00023099834016288915
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="0.99"} 0.00023099834016288915
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="0.999"} 0.00023099834016288915
shotover_chain_latency{chain="example_chain",client_details="127.0.0.1",quantile="1"} 0.000245891
shotover_chain_latency_sum{chain="example_chain",client_details="127.0.0.1"} 0.000682139
shotover_chain_latency_count{chain="example_chain",client_details="127.0.0.1"} 3

So instead lets just remove the register to avoid that.

Additionally process_request_rev was failing to specify the client_details which would have also been recorded in a separate metric.

An alternate approach would be to just remove the client_details from the metric but I assume that splitting the metrics up by client is useful?

@rukai rukai force-pushed the fix_empty_shotover_chain_latency branch from 7f7d65e to 4b3fe52 Compare December 22, 2022 03:17
Copy link
Member

@benbromhead benbromhead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup being able to see whats happening on a per client basis is super useful

@conorbros conorbros enabled auto-merge (squash) January 9, 2023 04:00
@conorbros conorbros merged commit ca23ad3 into shotover:main Jan 9, 2023
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.

None yet

3 participants