npm.io
0.0.1-canary.0 • Published 1 month ago

@interfere/nest

Licence
MIT
Version
0.0.1-canary.0
Deps
3
Size
13 kB
Vulns
0
Weekly
0

@interfere/nest

Status: canary. Pre-1.0 API, expect breaking changes. Pin to a specific 10.0.0-canary.N in CI.

NestJS SDK for Interfere. Wraps @interfere/node with a global exception filter and OTel auto-instrumentation for controllers, guards, pipes, interceptors, and middleware.

Install

bun add @interfere/nest

Usage

// instrument.ts — imported first in main.ts, before any @nestjs/* import
import { init } from "@interfere/nest";
await init({ serviceName: "my-api" });
// app.module.ts
import { Module } from "@nestjs/common";
import { InterfereModule } from "@interfere/nest";

@Module({ imports: [InterfereModule.forRoot()] })
export class AppModule {}

Set INTERFERE_API_KEY in the environment. Full docs at https://interfere.com/docs.