Skip to content

Conversation

@KyleTryon
Copy link
Contributor

This pull request updates the Sentry tracing middleware in the createHonoApp function to improve distributed tracing. The main change is to manually extract and propagate tracing headers (sentry-trace and baggage) from incoming requests, allowing traces to continue seamlessly from the frontend to the backend, as recommended in Sentry's distributed tracing documentation.

Distributed tracing improvements:

  • Updated the middleware in packages/api/src/hono/app.ts to manually extract sentry-trace and baggage headers from incoming requests and use Sentry.continueTrace to propagate distributed traces from the frontend, ensuring proper trace continuation and instrumentation. [1] [2]
  • Refactored the span creation logic to use the continued trace context and improved attribute assignment for HTTP method, route, URL, and response status.

@KyleTryon KyleTryon merged commit bbe31e6 into main Jan 23, 2026
14 checks passed
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.

2 participants