Nocturnally Psychologizing Millipede
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@opentelemetry/plugin-dns

0.8.0 • Public • Published

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

Useful links

License

Apache 2.0 - See LICENSE for more information.

Install

npm i @opentelemetry/plugin-dns

DownloadsWeekly Downloads

1,956

Version

0.8.0

License

Apache-2.0

Unpacked Size

43.1 kB

Total Files

17

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar