@baselime/trpc-opentelemetry-middleware
v0.1.2
Published
Instrument your TRPC Application with OpenTelemetry
Downloads
8,603
Readme
TRPC OpenTelemetry Middleware
Trace your TRPC Applications. If you don't use OpenTelemetry yet please see The Baselime Docs
Installation
npm i @baselime/trpc-opentelemetry-middleware
Setup
Add the Middleware to the procedures you want to trace
// trpc.ts
import { tracing } from "@baselime/trpc-opentelemetry-middleware";
const t = initTRPC.context<typeof createTRPCContext>().create({
...
});
// add the middleware to all the procedures you want to trace
export const publicProcedure = t.procedure.use(tracing({ collectInput: true }))