Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@cerbos/opentelemetry

npm

OpenTelemetry instrumentation for the gRPC and HTTP client libraries.

Prerequisites

  • Node.js 22+

Installation

$ npm install @cerbos/opentelemetry

Example usage

Register CerbosInstrumentation with your other OpenTelemetry instrumentation:

import { CerbosInstrumentation } from "@cerbos/opentelemetry";
import { registerInstrumentations } from "@opentelemetry/instrumentation";

registerInstrumentations({
  instrumentations: [...yourOtherInstrumentations, new CerbosInstrumentation()],
});

CommonJS support

This package is ESM-only, but may be required from CommonJS modules in Node.js versions 22.15+ and 24+.

Further reading

Get help