Skip to content

[logging] inspector: convert chat ingest, tunnels, widgets to typed events#1932

Merged
Vu-John merged 1 commit intomainfrom
logging-inspector-route-conversions-wave-1
Apr 26, 2026
Merged

[logging] inspector: convert chat ingest, tunnels, widgets to typed events#1932
Vu-John merged 1 commit intomainfrom
logging-inspector-route-conversions-wave-1

Conversation

@Vu-John
Copy link
Copy Markdown
Collaborator

@Vu-John Vu-John commented Apr 26, 2026

Summary

  • Converts persistChatSessionToConvex to emit chat.session.persist.failed typed events (with version_conflict, http_error, timeout, exception failure kinds) when a Hono Context is available; falls back to logger.warn for callers without a request context
  • Converts the widget-content POST handler to emit widget.resource.served on success and widget.resource.failed (with classifyWidgetError error codes) on early-return 404s and catch errors
  • Converts tunnels.ts /create and /create/:serverId to emit tunnel.created (for both new and pre-existing tunnels) and tunnel.creation_failed on catch; adds tunnel.record_failed inside recordTunnel's catch block via an optional c?: Context parameter
  • Converts OAuth proxy routes (/debug/proxy, /proxy, /metadata) to emit mcp.oauth.proxy.failed with targetUrlHost, oauthPhase, errorCode, and optional statusCode

Test plan

  • 4 new tests for chat-ingestion event emission: VERSION_CONFLICT JSON, http_error, timeout/AbortError, exception
  • All 759 server tests pass

🤖 Generated with Claude Code

@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 00:47 — with GitHub Actions Inactive
@chelojimenez
Copy link
Copy Markdown
Contributor

chelojimenez commented Apr 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 2026

Internal preview

Preview URL will appear in Railway after the deploy finishes.
Deployed commit: ff4d7be
PR head commit: 3aa9855
Backend target: staging fallback.
Access is employee-only in non-production environments.

@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from 8b4ed46 to f81b256 Compare April 26, 2026 00:55
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 00:55 — with GitHub Actions Inactive
@Vu-John Vu-John marked this pull request as ready for review April 26, 2026 00:56
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Apr 26, 2026
@Vu-John Vu-John changed the title feat(logging): emit typed structured events from route handlers (wave 1) [logging] inspector: convert chat ingest, tunnels, widgets to typed events Apr 26, 2026
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from f81b256 to f17abdd Compare April 26, 2026 01:42
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 01:42 — with GitHub Actions Inactive
@Vu-John Vu-John force-pushed the logging-inspector-authorize-wrapper branch from 837a168 to 9fcab59 Compare April 26, 2026 01:51
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from f17abdd to 88ec9a6 Compare April 26, 2026 01:51
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 01:51 — with GitHub Actions Inactive
@Vu-John Vu-John force-pushed the logging-inspector-authorize-wrapper branch from 9fcab59 to d48002d Compare April 26, 2026 02:18
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from 88ec9a6 to 96ee129 Compare April 26, 2026 02:18
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from 96ee129 to 0136f80 Compare April 26, 2026 02:22
@Vu-John Vu-John force-pushed the logging-inspector-authorize-wrapper branch from d48002d to 95f0834 Compare April 26, 2026 02:22
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 02:22 — with GitHub Actions Inactive
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from 0136f80 to bf47dba Compare April 26, 2026 03:21
@Vu-John Vu-John force-pushed the logging-inspector-authorize-wrapper branch from 95f0834 to 683f70a Compare April 26, 2026 03:21
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 03:21 — with GitHub Actions Inactive
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from bf47dba to 836264c Compare April 26, 2026 03:28
@Vu-John Vu-John force-pushed the logging-inspector-authorize-wrapper branch from 683f70a to fb0967b Compare April 26, 2026 03:28
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 03:28 — with GitHub Actions Inactive
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from 836264c to d3e3d78 Compare April 26, 2026 03:43
@Vu-John Vu-John force-pushed the logging-inspector-authorize-wrapper branch from fb0967b to a324b93 Compare April 26, 2026 03:43
@Vu-John Vu-John temporarily deployed to preview-pr-1932 April 26, 2026 03:43 — with GitHub Actions Inactive
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from d3e3d78 to d505dee Compare April 26, 2026 04:01
Base automatically changed from logging-inspector-authorize-wrapper to main April 26, 2026 04:10
Converts chat-ingestion, widget-content, tunnels, and OAuth proxy error
paths to emit typed structured events via getRequestLogger when a Hono
Context is available, falling back to legacy logger.warn for callers
without a request context.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@Vu-John Vu-John force-pushed the logging-inspector-route-conversions-wave-1 branch from d505dee to 3aa9855 Compare April 26, 2026 04:11
@Vu-John Vu-John merged commit 5c65045 into main Apr 26, 2026
9 of 11 checks passed
@Vu-John Vu-John deleted the logging-inspector-route-conversions-wave-1 branch April 26, 2026 04:12
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 979e9dfc-72f0-47e6-80f7-3772b682e089

📥 Commits

Reviewing files that changed from the base of the PR and between 094c84f and 3aa9855.

📒 Files selected for processing (5)
  • mcpjam-inspector/server/routes/apps/mcp-apps/index.ts
  • mcpjam-inspector/server/routes/mcp/oauth.ts
  • mcpjam-inspector/server/routes/mcp/tunnels.ts
  • mcpjam-inspector/server/utils/__tests__/chat-ingestion.test.ts
  • mcpjam-inspector/server/utils/chat-ingestion.ts

Walkthrough

This pull request instruments multiple server routes and utilities with structured request-scoped event logging. Changes add getRequestLogger integration across widget resource serving, OAuth proxy operations, and tunnel lifecycle handlers to emit classified error events and success metrics. The persistChatSessionToConvex utility is updated to accept an optional Hono Context parameter to enable conditional event emission on failure scenarios. New test cases validate event emission behavior across distinct failure paths. No response signatures or HTTP behaviors were altered.


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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants