Skip to content

feat(vss): log user_token (JWT sub) on auth and request log/sentry sites#15

Draft
bumi wants to merge 1 commit into
mainfrom
log-user-token-in-vss-logs
Draft

feat(vss): log user_token (JWT sub) on auth and request log/sentry sites#15
bumi wants to merge 1 commit into
mainfrom
log-user-token-in-vss-logs

Conversation

@bumi

@bumi bumi commented Jun 9, 2026

Copy link
Copy Markdown

Claude added logging the JWT sub to potentially help with maintenance identifying usage.

Summary

Adds the authenticated user_token (the JWT sub claim) as a structured field on the log and Sentry sites in handle_request, so requests can be correlated to a user/node identifier in app logs, Datadog spans, and Sentry.

Previously user_token was deliberately excluded from all tracing spans (skip(...)) and never appeared in logs or Sentry messages.

Changes (all in rust/server/src/vss_service.rs)

  • "Authentication successful" log now includes user_token.
  • Request-lifecycle logs/spans carry user_token: body-too-large (413), request-completed (200), key-not-found.
  • Error paths include user_token in both the tracing event and the Sentry message: internal server error, generic request error, protobuf parse error.
  • The handler call now passes user_token.clone() so the value stays available for the post-handler log/sentry sites (it was previously moved into the handler).

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.

1 participant