@frzzzy/opentelemetry-instrumentation-typeorm
v0.40.0
Published
open telemetry instrumentation for the `typeorm` module
Downloads
1
Readme
OpenTelemetry TypeORM Instrumentation for Node.js
This module provides automatic instrumentation for TypeORM
.
Installation
npm install --save @frzzzy/opentelemetry-instrumentation-typeorm
Supported Versions
This instrumentation supports >0.2.28
:
Usage
For further automatic instrumentation instruction see the @opentelemetry/instrumentation package.
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { TypeormInstrumentation } = require('opentelemetry-instrumentation-typeorm');
const tracerProvider = new NodeTracerProvider({
// be sure to disable old plugin
plugins: {
typeorm: { enabled: false, path: 'opentelemetry-plugin-typeorm' }
}
});
registerInstrumentations({
tracerProvider,
instrumentations: [
new TypeormInstrumentation({
// see under for available configuration
})
]
});
TypeORM Instrumentation Options
TypeORM instrumentation has few options available to choose from. You can set the following: