OpenTelemetry Generic Pool Instrumentation for Node.js
This module provides basic automatic instrumentation for generic-pool
creating a span for every acquire call.
For automatic instrumentation see the
@opentelemetry/sdk-trace-node package.
Installation
npm install --save @opentelemetry/instrumentation-generic-pool
Supported Versions
Usage
const { ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { GenericPoolInstrumentation } = require('@opentelemetry/instrumentation-generic-pool');
const provider = new NodeTracerProvider();
provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.register();
registerInstrumentations({
instrumentations: [new GenericPoolInstrumentation()],
tracerProvider: provider,
});
Useful links
License
Apache 2.0 - See LICENSE for more information.