@baselime/trpc-opentelemetry-middleware
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

TRPC OpenTelemetry Middleware

Trace your TRPC Applications. If you don't use OpenTelemetry yet please see The Baselime Docs

TRPC Tracing

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 }))

Package Sidebar

Install

npm i @baselime/trpc-opentelemetry-middleware

Weekly Downloads

1,488

Version

0.1.2

License

MIT

Unpacked Size

9.45 kB

Total Files

7

Last publish

Collaborators

  • ta_baselime
  • boristane