-
Notifications
You must be signed in to change notification settings - Fork 995
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
Add metric for data availability wait time #13534
Conversation
dataAvabilityWaitedTime = promauto.NewSummary(prometheus.SummaryOpts{ | ||
Name: "da_waited_time_milliseconds", | ||
Help: "Total time to wait for a data availability check in ReceiveBlock(), a node is blocked during this time", | ||
}) |
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.
suggest “total time spent waiting”. also do we need the comment about the node blocking in the metric description? i’m sure that fact is true about a number of other metrics.
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.
"total time spent waiting" is a bit vague. It could be waiting for a lot of things. How about "total time spent waiting da"?
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.
That's basically what I meant - replace "Total time to wait
for a data availability check", with "Total time spent waiting
for a data availability check".
@@ -209,6 +209,7 @@ func (s *Service) ReceiveBlock(ctx context.Context, block interfaces.ReadOnlySig | |||
|
|||
timeWithoutDaWait := time.Since(receivedTime) - daWaitedTime | |||
chainServiceProcessingTime.Observe(float64(timeWithoutDaWait.Milliseconds())) | |||
dataAvabilityWaitedTime.Observe(float64(daWaitedTime.Milliseconds())) |
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 are some error returns between this metrics update and where daWaitedTime
is set. I think we should call Observe
right after line 124.
This PR introduces a valuable metric: data availability wait time. This metric measures the duration a node is blocked at
ReceiveBlock
, making it crucial to monitor.