Skip to content

feat(hono): add orchestrion-based auto-instrumentation - #24497

Draft
mydea wants to merge 1 commit into
feat/hono-move-to-server-utilsfrom
feat/hono-orchestrion-instrumentation
Draft

mydea wants to merge 1 commit into
feat/hono-move-to-server-utilsfrom
feat/hono-orchestrion-instrumentation

Conversation

@mydea

@mydea mydea commented Sep 18, 2026

Copy link
Copy Markdown
Member

Second of two stacked PRs splitting the Hono instrumentation rework (originally #24371). Stacked on #24496 — review/merge that first; the diff here is against the base PR's branch.

Adds honoIntegration, the auto-instrumentation that hooks Hono through the orchestrion module transform (node:diagnostics_channel) so requests are route-enriched without a manual sentry() middleware, plus its manual counterpart honoMiddleware. Registers it in getTracingIntegrations() and re-exports both from the server runtimes (node, cloudflare, bun, deno, and the serverless / meta-framework packages).

Also adds the orchestrion transform config for hono, node-integration-tests for the auto-instrumentation, and a new orchestrion-based hono-4 e2e app (the middleware-based app now lives as hono-4-legacy, added in the base PR). node-mastra now asserts route-enriched Hono spans in prod, where Hono is external and orchestrion-instrumented.

🤖 Generated with Claude Code

Add `honoIntegration`, the auto-instrumentation that hooks Hono through the
orchestrion module transform (`node:diagnostics_channel`) so requests are
route-enriched without a manual `sentry()` middleware, plus its manual
counterpart `honoMiddleware`. Register it in `getTracingIntegrations()` and
re-export both from the server runtimes (node, cloudflare, bun, deno, and the
serverless/meta-framework packages).

Adds the orchestrion transform config for `hono`, node-integration-tests for
the auto-instrumentation, and a new orchestrion-based `hono-4` e2e app (the
middleware-based app now lives as `hono-4-legacy`). node-mastra now asserts
route-enriched Hono spans in prod, where Hono is external and instrumented.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1e729ec. Configure here.

await guardPromise;

expect(errorEventOccurred).toBe(false);
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shared GET / wait can flake

Medium Severity

Several tests wait for a generic GET / span while Playwright runs with workers: '100%'. That matcher is not unique, so one test can consume another test's index-route span. The HTTPException “not captured” checks can then finish before their own error would have arrived and pass incorrectly. Flagged because the review rules call out non-unique waits under parallel workers.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 1e729ec. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.09 kB - -
@sentry/browser - with treeshaking flags 27.35 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.26 kB - -
@sentry/browser (incl. Tracing) 50.6 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 50.62 kB - -
@sentry/browser (incl. Tracing, Profiling) 53.61 kB - -
@sentry/browser (incl. Tracing, Replay) 90.15 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.25 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 94.85 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 107.83 kB - -
@sentry/browser (incl. Feedback) 46.62 kB - -
@sentry/browser (incl. sendFeedback) 34.15 kB - -
@sentry/browser (incl. FeedbackAsync) 39.26 kB - -
@sentry/browser (incl. Metrics) 30.1 kB - -
@sentry/browser (incl. Logs) 30.35 kB - -
@sentry/browser (incl. Metrics & Logs) 31.02 kB - -
@sentry/react 30.84 kB - -
@sentry/react (incl. Tracing) 52.94 kB - -
@sentry/vue 36.34 kB - -
@sentry/vue (incl. Tracing) 52.91 kB - -
@sentry/svelte 29.11 kB - -
CDN Bundle 30.8 kB - -
CDN Bundle (incl. Tracing) 51.15 kB - -
CDN Bundle (incl. Logs, Metrics) 33.06 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.14 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.75 kB - -
CDN Bundle (incl. Tracing, Replay) 88.69 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 90.63 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 94.73 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 96.78 kB - -
CDN Bundle - uncompressed 91.16 kB - -
CDN Bundle (incl. Tracing) - uncompressed 152.66 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.73 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 158.61 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.14 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 272.23 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 278.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 285.93 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 291.86 kB - -
@sentry/nextjs (client) 55.27 kB - -
@sentry/sveltekit (client) 51.05 kB - -
@sentry/core/server 39.63 kB - -
@sentry/core/browser 13.66 kB - -
⛔️ @sentry/node (max: 135 kB) 135.14 kB +1.41% +1.87 kB 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.38 kB +0.34% +273 B 🔺
@sentry/node - without tracing 91.66 kB +2% +1.79 kB 🔺
@sentry/node - without channel injection 113.77 kB +1.46% +1.63 kB 🔺
@sentry/aws-serverless 99.89 kB +1.8% +1.76 kB 🔺
@sentry/cloudflare (withSentry) - minified 204.69 kB - -
@sentry/cloudflare (withSentry) 509.25 kB - -

View base workflow run

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