opentelemetry-plugin-mssql
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

OpenTelemetry mssql Instrumentation for Node.js

This module provides automatic instrumentation for mssql

There are two variations

Instrumention Variation

This is the recomended variation. The source code can be found here

In Progress

Plugin Variation

This variation would be depreciated soon. The source code can be found here

Installation

npm install --save opentelemetry-plugin-mssql

Usage

import {LogLevel} from '@opentelemetry/core'
import {NodeTracerProvider} from '@opentelemetry/node'
import {registerInstrumentations} from '@opentelemetry/instrumentation'

// Enable OpenTelemetry exporters to export traces to Grafan Tempo.
const provider = new NodeTracerProvider ({
    plugins: {
        mssql: {
            enabled: true,
            // You may use a package name or absolute path to the file.
            path: "opentelemetry-plugin-mssql",
        },
    },
    logLevel: LogLevel.ERROR,      
});

registerInstrumentations({
    tracerProvider: provider
});

Sample Trace

Instrumentation

Supported

  • Request.query
  • ConnectionPool.query

Future

  • Request.execute
  • Request.batch
  • Request.bulk
  • ConnectionPool.batch

Readme

Keywords

Package Sidebar

Install

npm i opentelemetry-plugin-mssql

Weekly Downloads

20

Version

0.3.0

License

Apache-2.0

Unpacked Size

35.9 kB

Total Files

26

Last publish

Collaborators

  • mnadeem