Returns instrumentations for outbound HTTP traffic — Node http/https (covers node-fetch etc.) and undici (covers global fetch).
http
https
node-fetch
undici
fetch
Both packages are declared as optional peer dependencies of @cleverbrush/otel. Install them in the host project to use:
@cleverbrush/otel
npm install @opentelemetry/instrumentation-http @opentelemetry/instrumentation-undici Copy
npm install @opentelemetry/instrumentation-http @opentelemetry/instrumentation-undici
an array of instrumentation instances ready to pass to import('./setupOtel.js').setupOtel
import { setupOtel } from '@cleverbrush/otel';import { outboundHttpInstrumentations } from '@cleverbrush/otel/instrumentations';setupOtel({ serviceName: 'todo-backend', instrumentations: outboundHttpInstrumentations(),}); Copy
import { setupOtel } from '@cleverbrush/otel';import { outboundHttpInstrumentations } from '@cleverbrush/otel/instrumentations';setupOtel({ serviceName: 'todo-backend', instrumentations: outboundHttpInstrumentations(),});
Returns instrumentations for outbound HTTP traffic — Node
http/https(coversnode-fetchetc.) andundici(covers globalfetch).Both packages are declared as optional peer dependencies of
@cleverbrush/otel. Install them in the host project to use: