-
Notifications
You must be signed in to change notification settings - Fork 21.6k
ethstats: report processing time #33231
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
base: master
Are you sure you want to change the base?
ethstats: report processing time #33231
Conversation
core/events.go
Outdated
|
|
||
| type ChainHeadEvent struct { | ||
| Header *types.Header | ||
| Time uint64 |
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 be renamed to ProcessingTime or something, and the type should be time.Duration.
|
Overall, I like the idea, but it'd be good to implement OpenTelemetry tracing in the engine API as well. |
|
cc @Savid |
| defer func() { | ||
| if lastCanon != nil && bc.CurrentBlock().Hash() == lastCanon.Hash() { | ||
| bc.chainHeadFeed.Send(ChainHeadEvent{Header: lastCanon.Header()}) | ||
| bc.chainHeadFeed.Send(ChainHeadEvent{Header: lastCanon.Header(), ProcessingTime: mclock.Now().Sub(stats.startTime)}) |
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 tested locally the other day and actually needed to add it to this one SetCanonical (which already has a start time too)
I'm wondering if we actually make a new ethstats event focused around engine_newPayloadVX calls and do the timing there?
The issue with existing block ethstats event is chainHeadFeed can be fired from 5+ different locations which would all require timing (which i think won't make sense in some cases) and the ethstats report also sends current head block which doesn't have timing value.
This new event block_new_payload (?) would only fire when valid block comes over the engine api. thoughts?
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 guess it's also fine if we accept block event sometimes returns no processingTime and just handle that on the ethstats server side
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.
PoC #33395
Implements https://notes.ethereum.org/@savid/block-observability
Draft for now, looking for feedback on it