-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added metrics for observed waypoints #12785
Conversation
85ba297
to
b0128ad
Compare
@@ -31,6 +31,8 @@ var ( | |||
BlockConsumerPreExecutionDelay = metrics.NewSummary(`block_consumer_delay{type="pre_execution"}`) | |||
BlockConsumerPostExecutionDelay = metrics.NewSummary(`block_consumer_delay{type="post_execution"}`) | |||
BlockProducerProductionDelay = metrics.NewSummary(`block_producer_delay{type="production"}`) | |||
ObservedWaypointCheckpointLength = metrics.NewSummary(`observed_waypoint_length{type="checkpoint"}`) |
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.
would suggest to move these inside the heimdall
package
polygon/sync/tip_events.go
Outdated
@@ -201,6 +203,16 @@ func (te *TipEvents) Run(ctx context.Context) error { | |||
}, heimdall.WithEventsLimit(5)) | |||
defer milestoneObserverCancel() | |||
|
|||
metricsMilestoneObserverCancel := te.heimdallObserverRegistrar.RegisterMilestoneObserver(func(milestone *heimdall.Milestone) { |
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.
would suggest to move these inside the heimdall
package, can be registered as background daemons of the heimdall.Service
inside its Run
method
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.
moved to heimdall
@@ -31,6 +31,8 @@ var ( | |||
BlockConsumerPreExecutionDelay = metrics.NewSummary(`block_consumer_delay{type="pre_execution"}`) | |||
BlockConsumerPostExecutionDelay = metrics.NewSummary(`block_consumer_delay{type="post_execution"}`) | |||
BlockProducerProductionDelay = metrics.NewSummary(`block_producer_delay{type="production"}`) | |||
ObservedWaypointCheckpointLength = metrics.NewSummary(`observed_waypoint_length{type="checkpoint"}`) | |||
ObservedWaypointMilestoneLength = metrics.NewSummary(`observed_waypoint_length{type="milestone"}`) |
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.
do we need these to be summary
-ies or would not a gauge
metric type be more suitable?
b0128ad
to
8559b2d
Compare
No description provided.