Skip to content

fix(node): give every gRPC handler a request-scoped logger#151

Merged
mweibel merged 1 commit into
masterfrom
node-request-logger
Jun 4, 2026
Merged

fix(node): give every gRPC handler a request-scoped logger#151
mweibel merged 1 commit into
masterfrom
node-request-logger

Conversation

@mweibel
Copy link
Copy Markdown
Collaborator

@mweibel mweibel commented Jun 1, 2026

The node-service RPCs previously logged with the package-level default logger and ad-hoc field names, so the same volume_id appeared under different keys (sometimes "volume_id", sometimes "device_path") and many lines landed without enough context to correlate with kubelet's view.

Build a single *logrus.Entry at the top of each handler with the canonical request fields (volume_id, staging_target_path, target_path, …) and thread it through the helpers.

Additionally, fixes two instances of using error equality check instead of errors.Is.

@mweibel mweibel requested a review from disperate June 1, 2026 10:01
Copy link
Copy Markdown
Contributor

@disperate disperate left a comment

Choose a reason for hiding this comment

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

LGTM. Minor comment.

Comment thread driver/node.go Outdated
The node-service RPCs previously logged with the package-level default
logger and ad-hoc field names, so the same volume_id appeared under
different keys (sometimes "volume_id", sometimes "device_path") and many
lines landed without enough context to correlate with kubelet's view.

Build a single *logrus.Entry at the top of each handler with the
canonical request fields (volume_id, staging_target_path, target_path,
…) and thread it through the helpers.

Additionally, fixes two instances of using error equality
check instead of errors.Is.
@mweibel mweibel force-pushed the node-request-logger branch from 01d8e88 to 9d1fbe5 Compare June 4, 2026 09:30
@mweibel mweibel merged commit 91eb2ff into master Jun 4, 2026
1 check passed
@mweibel mweibel deleted the node-request-logger branch June 4, 2026 10:46
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.

2 participants