File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/platforms/node/common/configuration/integrations Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -137,3 +137,26 @@ Sentry.init({
137
137
tracePropagationTargets: [" my-site-url.com" ],
138
138
});
139
139
```
140
+
141
+ ## Frameworks
142
+
143
+ ### tRPC Middleware
144
+
145
+ _ (New in version 7.48.0)_
146
+
147
+ The Sentry tRPC middleware helps make sure your transactions related to RPCs are well-named.
148
+ Additionally, it can attach RPC input via the ` attachRpcInput ` option.
149
+
150
+ ``` typescript
151
+ import { initTRPC } from " @trpc/server" ;
152
+ import * as Sentry from " @sentry/node" ;
153
+
154
+ const t = initTRPC .context ().create ();
155
+ const sentryMiddleware = t .middleware (
156
+ Sentry .Handlers .trpcMiddleware ({
157
+ attachRpcInput: true ,
158
+ })
159
+ );
160
+
161
+ const sentrifiedProcedure = t .procedure .use (sentryMiddleware );
162
+ ```
You can’t perform that action at this time.
0 commit comments