@connectum/otel
OpenTelemetry providers, server/client RPC instrumentation, metrics, logging, and deep tracing helpers.
Install
bash
npm install @connectum/otelbash
pnpm add @connectum/otelbash
bun add @connectum/otelPeer dependencies: @bufbuild/protobuf ^2.16.0 and @connectrpc/connect ^2.2.0, shared with your application. npm 7+, pnpm and Bun install missing peers automatically; on Yarn, add them yourself — see Peer dependencies on protobuf and Connect.
Start Here
typescript
import { createOtelInterceptor, initProvider } from '@connectum/otel';
initProvider({ serviceName: 'orders-service' });
const interceptor = createOtelInterceptor({ serverPort: 5000 });Key Entry Points
| Entry point | Use it to |
|---|---|
initProvider | Initialize trace, metric, and log providers. |
getProvider / OtelProvider | Get the shared provider (tracer, meter, logger, shutdown()) and name its type; see Provider management. |
createOtelInterceptor | Instrument inbound RPCs. |
createOtelClientInterceptor | Instrument outbound RPCs and propagate context. |
Learn / Configure / API Reference
- Learn: Focused guide
- Configure: Task and configuration guidance
- API reference: Exact options and symbols
- Package API index: Generated TypeDoc
- Source: @connectum/otel on GitHub
Related Modules
Compare all Connectum packages by capability.