opentelemetry-js/packages/opentelemetry-plugin-dns
Mayur Kale 6b9d3afff9
chore: update out-of-date dependencies (#858)
2020-03-13 11:32:05 -07:00
..
src feat: use context-based tracing (#816) 2020-03-02 13:47:35 -05:00
test fix: change SpanContext.traceFlags to mandatory (#818) 2020-03-06 08:40:13 -08:00
.npmignore feat(plugin-dns): add lookup patches (#424) 2019-10-16 12:06:18 -07:00
LICENSE feat(plugin-dns): add lookup patches (#424) 2019-10-16 12:06:18 -07:00
README.md chore: fix usage instructions from READMEs (#836) 2020-03-04 08:48:40 -08:00
package.json chore: update out-of-date dependencies (#858) 2020-03-13 11:32:05 -07:00
tsconfig.json feat(plugin-dns): add lookup patches (#424) 2019-10-16 12:06:18 -07:00
tslint.json feat(plugin-dns): add lookup patches (#424) 2019-10-16 12:06:18 -07:00

README.md

OpenTelemetry DNS Instrumentation for Node.js

Gitter chat dependencies devDependencies Apache License

This module provides automatic instrumentation for dns.

For automatic instrumentation see the @opentelemetry/node package.

Installation

npm install --save @opentelemetry/plugin-dns

Usage

const { NodeTracerProvider } = require('@opentelemetry/node');

const provider = new NodeTracerProvider({
  plugins: {
    dns: {
      enabled: true,
      // You may use a package name or absolute path to the file.
      path: '@opentelemetry/plugin-dns',
      // dns plugin options
    }
  }
});

Zipkin

If you use Zipkin, you must use ignoreHostnames in order to not trace those calls. If the server is local. You can set :

const provider = new NodeTracerProvider({
  plugins: {
    dns: {
      enabled: true,
      // You may use a package name or absolute path to the file.
      path: '@opentelemetry/plugin-dns',
      ignoreHostnames: ['localhost']
    }
  }
});

Dns Plugin Options

Dns plugin has currently one option. You can set the following:

Options Type Description
ignoreHostnames IgnoreMatcher[] Dns plugin will not trace all requests that match hostnames

License

Apache 2.0 - See LICENSE for more information.