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/node package.
Installation
npm install --save @opentelemetry/instrumentation-generic-pool
Supported Versions
Usage
const { ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/tracing');
const { NodeTracerProvider } = require('@opentelemetry/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.