Skip to content

myrotvorets/opentelemetry-plugin-knex

Repository files navigation

opentelemetry-plugin-knex

Quality Gate Status Build and Test

OpenTelemetry knex automatic instrumentation package

Usage

import { NodeSDK } from '@opentelemetry/sdk-node';
import { KnexInstrumentation } from '@myrotvorets/opentelemetry-plugin-knex';
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';

const sdk = new NodeSDK({
    serviceName: 'example',
    instrumentations: [new HttpInstrumentation(), new KnexInstrumentation()],
});

sdk.start();

See the example directory for a working example.