-
Notifications
You must be signed in to change notification settings - Fork 605
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
feat(metrics): add counter for retry create stream reader #20258
base: main
Are you sure you want to change the base?
Conversation
let init_stream_reader_retry_count = register_guarded_int_counter_vec_with_registry!( | ||
"source_init_stream_reader_retry_count", | ||
"Total number of retries to initialize stream reader", | ||
&["actor_id", "source_name",], | ||
registry | ||
) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add this to grafana dashboard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it overlaps with source_status_is_up
(from source enumerator), so I don't add it to grafana.
But here we focus more on the retry on the compute node, planning add it to cloud alert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I don't know we have source_status_is_up
!
Then what about adding it to the same panel (Source Upstream Status
), so that we can both know whether the source is up on meta and each CN. 🤔
let source_ctx_inner = source_ctx_clone.clone(); | ||
source_ctx_inner.metrics.init_stream_reader_retry_count.with_guarded_label_values(&[ | ||
&source_ctx_inner.actor_id.to_string(), | ||
&source_ctx_inner.source_name, | ||
]).inc(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we simply move this into source_reader.build_stream
? And perhaps rename to stream_reader_build_count
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am struggling with it too, suspect somewhere calls a rate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the reason is RW is reporting the metric from multiple nodes and the count value from each node varies, leading to the fluctuation.
But it is irrelevant to the alert part, we always alert when the value is non-zero.
This pull request has been modified. If you want me to regenerate unit test for any of the files related, please find the file in "Files Changed" tab and add a comment |
let's wait for #20295, to minimize the changes. |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
follow up #19805
manually test
Checklist
Documentation
Release note