Skip to content

vmbus_server: improve tracing #1027

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lilgrassin
Copy link

Adds the associated vtl to vmbus_server trace events to aid debugging.

@jstarks
Copy link
Member

jstarks commented Mar 13, 2025

I think we want to find some kind of span-based solution rather than have common metadata that we have to remember to put in each event.

@jstarks
Copy link
Member

jstarks commented Mar 13, 2025

Probably ideally the thing that constructs the vmbus server should create the span, since it knows the VTL and also other identifying metadata.

@lilgrassin lilgrassin force-pushed the user/ligrassi/vmbus/add_vtl_tracing branch from c7ef5bf to 8ed53dc Compare April 9, 2025 05:42
@lilgrassin lilgrassin changed the title vmbus_server: add vtl to trace events vmbus_server: improve tracing Apr 9, 2025
@lilgrassin lilgrassin marked this pull request as ready for review April 9, 2025 06:47
@lilgrassin lilgrassin requested review from a team as code owners April 9, 2025 06:47
@@ -1866,7 +1892,7 @@ impl<'a, N: 'a + Notifier> ServerWithNotifier<'a, N> {
| ChannelState::Revoked
| ChannelState::Reoffered
| ChannelState::ClosingClientRelease => {
tracing::error!(?offer_id, state = ?channel.state, "invalid open complete")
tracing::error!(state = ?channel.state, "Invalid channel state");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conventionally we start with a lowercase letter.

@@ -215,28 +222,33 @@ enum ConnectionState {
Disconnecting {
next_action: ConnectionAction,
modify_sent: bool,
trace: Span,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there really no better way of doing this than storing this span everywhere? What is the reason we need this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I had hoped we'd just have a single root span for the vmbus server task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants