You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TrpcMiddleware support for forceTransaction in span creation #15505
Currently, when using the trpc middleware from packages/core/src/trpc.ts, a span is created using startSpanManual.
I'd like to force this span creation to create a transaction and this could be done by adding the forceTransaction: true. However, currently, the only options to pass into the middleware SentryTrpcMiddlewareOptions is attachRpcInput?: boolean.
Solution Brainstorm
We could add forceTransaction?: boolean to SentryTrpcMiddlewareOptions and then pass it to startSpanManual as an argument if it is truthy.
Hey @leoambio thanks for reaching out! Yes that sounds reasonable, would you maybe be up for contributing this change? No worries if not, I'll put it on my list otherwise!
Activity
chargome commentedon Feb 26, 2025
Hey @leoambio thanks for reaching out! Yes that sounds reasonable, would you maybe be up for contributing this change? No worries if not, I'll put it on my list otherwise!
leoambio commentedon Feb 26, 2025
Hey @chargome! Sounds good, I think I can make a PR later this week.
leoambio commentedon Feb 27, 2025
@chargome thanks for helping with the PR! 🚀 when can i expect this feature to be released?
chargome commentedon Feb 27, 2025
We'll likely release today, you'll get notified in this issue once you can upgrade!
feat(core): Add `forceTransaction` to trpc middleware options (#15519)
github-actions commentedon Feb 28, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #15519, which was included in the 9.3.0 release.