Skip to content

mnadeem/opentelemetry-instrumentation-mssql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Installation

TODO

Usage

TODO

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

About

Opentelemetry js plugin for mssql npm to enable Auto instrumentation for db calls.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors