Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@s-r-x
Copy link
Contributor

@s-r-x s-r-x commented Dec 14, 2025

Summary by CodeRabbit

  • Documentation
    • Updated the observability guide with revised middleware implementation examples for logging, debugging, and tracing
    • Middleware examples across documentation now demonstrate updated usage patterns and response access methods

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the documentation Everything documentation related label Dec 14, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

Walkthrough

Documentation examples in the observability guide are updated to demonstrate the current middleware API. Method calls change from createMiddleware().handler(...) to createMiddleware().server(...), with corresponding variable access pattern adjustments from response to result.response across three example middlewares.

Changes

Cohort / File(s) Summary
Observability Examples
docs/start/framework/react/guide/observability.md
Updated three middleware examples (requestLogger, debugMiddleware, tracingMiddleware) to use createMiddleware().server(...) instead of .handler(...), and adjusted variable access patterns from response to result.response to match the new API return structure

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • All changes are repetitive documentation updates following the same pattern across three examples
  • No production code modifications; purely documentation/example corrections
  • Changes are straightforward variable and method name replacements with consistent structure

Poem

🐰 Middleware hops to a newer way,
.server() now leads the day,
From response to result.response we go,
Examples dance with the API's flow!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating createMiddleware usage examples in the Observability guide documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85bf22e and 8d54c5a.

📒 Files selected for processing (1)
  • docs/start/framework/react/guide/observability.md (4 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Use relative links to docs/ folder format (e.g., ./guide/data-loading) for internal documentation references

Files:

  • docs/start/framework/react/guide/observability.md
🔇 Additional comments (3)
docs/start/framework/react/guide/observability.md (3)

100-114: Middleware request logger correctly updated to new API.

The request/response logging middleware properly migrates from .handler() to .server() and correctly accesses the downstream response via result.response.status.


338-348: Middleware debug headers correctly updated to new API.

The debug middleware properly migrates from .handler() to .server() and correctly accesses and modifies response headers via result.response.headers.


671-702: Middleware OpenTelemetry tracing correctly updated to new API.

The tracing middleware properly migrates from .handler() to .server() and correctly accesses the response status via result.response.status.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@schiller-manuel schiller-manuel merged commit 2c40790 into TanStack:main Dec 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants