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

The monitoring indicators of consul_rpc_queries_blocking maybe not accurate #10193

Open
lambdaxs opened this issue May 6, 2021 · 1 comment
Labels
theme/telemetry Anything related to telemetry or observability type/question Not an "enhancement" or "bug". Please post on discuss.hashicorp

Comments

@lambdaxs
Copy link

lambdaxs commented May 6, 2021

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

A paragraph or two about the issue you're experiencing.

Reproduction Steps

Steps to reproduce this issue, eg:

1.when I watch a key, the consul_rpc_queries_blocking value will +1.

2.when I use Ctrl+c to cancel the watch, the consul_rpc_queries_blocking not -1.

So, Is there a delay in the statistics of this indicator ?Emmm ...How many seconds will this delay?

image

@dnephin dnephin added theme/telemetry Anything related to telemetry or observability type/question Not an "enhancement" or "bug". Please post on discuss.hashicorp labels May 6, 2021
@dnephin
Copy link
Contributor

dnephin commented May 6, 2021

Thank you for the question! I believe this is happening because ctrl-c is not actually able to shutdown the blocking queries that are used by the watches. ctrl-c only stops the cli process, but there's no way to propagate that shutdown back to the blocking query. The RPC interface uses https://golang.org/pkg/net/rpc/ , which does not support cancellation.

The blocking query should time out after 10 minutes, at which time you should see the metric decrement.

We are slowly moving to gRPC instead of net/rpc. gRPC does support cancellation, so once all the RPC endpoints are ported, cancellation should work properly, and the metrics should be updated almost immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/telemetry Anything related to telemetry or observability type/question Not an "enhancement" or "bug". Please post on discuss.hashicorp
Projects
None yet
Development

No branches or pull requests

2 participants