1.0.1 • Published 6 years ago

zipkin-instrumentation-mysql2 v1.0.1

Weekly downloads
218
License
MIT
Repository
github
Last release
6 years ago

zipkin-instrumentation-mysql2

NPM Version NPM Downloads Node.js Version License

This library is a wrapper for mysql2 for zipkin.

Usage

const { Tracer } = require('zipkin')
const mysql2 = require('mysql2')
const zipkinClient = require('zipkin-instrumentation-mysql2')

const tracer = new Tracer({ctxImpl, recorder}) // configure tracer here

const wrappedMysqlClient = zipkinClient(mysql2, tracer)

const connOptions = {
  user: 'myuser',
  password: 'pass',
  host: 'localhost',
  database: 'dbname',
}

const client = wrappedMysqlClient.createConnection(connOptions)

// Add your code here
client.query('SELECT 1+1 as two, NOW() as `now`', (err, result, fields) => {
  console.log(err, result, fields)
})

Thanks

Thanks to juspay for juspay/zipkin-instrumentation-mysql

1.0.1

6 years ago

1.0.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago