0.15.0 • Published 3 years ago

@opentelemetry/plugin-dns v0.15.0

Weekly downloads
12,359
License
Apache-2.0
Repository
github
Last release
3 years ago

OpenTelemetry DNS Instrumentation for Node.js

NPM Published Version 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 { registerInstrumentations } = require('@opentelemetry/instrumentation');

const provider = new NodeTracerProvider();
provider.register();

registerInstrumentations({
  instrumentations: [
    {
      plugins: {
        dns: {
          enabled: true,
          // You may use a package name or absolute path to the file.
          path: '@opentelemetry/plugin-dns',
          // dns plugin options
        }
      }
    },
  ],
  tracerProvider: provider,
});

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();
provider.register();
registerInstrumentations({
  instrumentations: [
    {
      plugins: {
        dns: {
          enabled: true,
          // You may use a package name or absolute path to the file.
          path: '@opentelemetry/plugin-dns',
          ignoreHostnames: ['localhost']
        }
      }
    },
  ],
  tracerProvider: provider,
});

Dns Plugin Options

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

OptionsTypeDescription
ignoreHostnamesIgnoreMatcher[]Dns plugin will not trace all requests that match hostnames

Useful links

License

Apache 2.0 - See LICENSE for more information.

0.15.0

3 years ago

0.14.0

3 years ago

0.13.1

3 years ago

0.13.0

3 years ago

0.12.1

3 years ago

0.12.0

3 years ago

0.11.0

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago