Skip to content

Clarify request logging with nested req/res fields#19

Merged
dillonstreator merged 2 commits into
mainfrom
chore/otel-request-log-field-names
Jul 24, 2026
Merged

Clarify request logging with nested req/res fields#19
dillonstreator merged 2 commits into
mainfrom
chore/otel-request-log-field-names

Conversation

@dillonstreator

@dillonstreator dillonstreator commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Nest request logging under req / res with clear field names (pino-http style)
  • Replace cryptic abbreviations (ua, br, bw) with userAgent, bytesRead, bytesWritten
  • Use responseTime for duration in milliseconds; bind request id as req.id

Test plan

  • Run pnpm test and confirm existing suites pass
  • Hit an endpoint and verify the finish log looks like { req: { id, method, path, userAgent, ip, bytesRead }, res: { statusCode, bytesWritten }, responseTime }
  • Confirm request-scoped logs (e.g. /hi) still include req.id

dillonstreator and others added 2 commits July 24, 2026 10:38
EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
Prefer pino-http-style names over OpenTelemetry attribute keys so application logs stay readable while OTel continues to own trace attributes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dillonstreator dillonstreator changed the title Align request logging fields with OpenTelemetry conventions Clarify request logging with nested req/res fields Jul 24, 2026
@dillonstreator
dillonstreator merged commit d1b9f09 into main Jul 24, 2026
1 check passed
@github-actions github-actions Bot mentioned this pull request Jul 24, 2026
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