-
Notifications
You must be signed in to change notification settings - Fork 89
Trace connection durations #5146
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: main
Are you sure you want to change the base?
Conversation
425fb9a
to
2a6e3e0
Compare
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.
The life time of inbound / outbound connection ought to be measured by the connection manager, as it knows enough about a connection to do that. It can also measure lifespan of a connection (which could be longer than either of them).
However, connection manager doesn't know about protocol temperature, so it cannot measure how long a peer was hot or remote hot - and this should be logged by peer selection actions and inbound governor respectively.
Are we actually interested in knowing the connection duration at the handler level? I thought about that and didn't find the metric useful enough in general and so decided against implementing re your first point. If we want to track outbound duration to big ledger peers, the connection duration might not give an accurate result if the connection was used via the inbound side strictly at least some of the time. This implementation will give the connection durations separately for outbound and inbound sides via patches in the inbound governor and peer state actions (via peer connection handle, so the duration can be exposed to peer selection governor easily in the future if we do decide to implement a max duration policy). |
993087c
to
dee490c
Compare
A trace is emitted whenever a hot outbound peer is demoted or closed (possibly due to an error), giving the duration in seconds of how long the peer has been in hot mode. Some other refactoring to aid comprehensibility
dee490c
to
8951682
Compare
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.
For this to be usable in the way we discussed I think that the lifetime for the hot connections must be included in the DebugSt data too.
We are looking for the life time of the longest lived connections, and they may still be active. That is emitting a trace event for hot demotions won't capture these connections.
84598db
to
692bf9f
Compare
Traces durations upon receiving sigusr1 interrupt.
692bf9f
to
c718863
Compare
Description
It may be useful for some diagnostic purposes to know how long lived
an outbound hot connection has been. This patch introduces tracing
when a hot peer is demoted or errors out with the active time in seconds.
Checklist
Quality
Maintenance
ouroboros-network
project.