Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@opentelemetry/instrumentation-dns
Advanced tools
OpenTelemetry dns automatic instrumentation package.
@opentelemetry/instrumentation-dns is an npm package that provides automatic instrumentation for DNS operations in Node.js applications. It helps in collecting and reporting telemetry data for DNS queries, which can be useful for monitoring and debugging purposes.
Automatic DNS Query Instrumentation
This feature allows you to automatically instrument DNS queries in your Node.js application. The code sample demonstrates how to set up the DNS instrumentation using the OpenTelemetry SDK.
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { DnsInstrumentation } = require('@opentelemetry/instrumentation-dns');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new DnsInstrumentation(),
],
tracerProvider: provider,
});
dd-trace is the Datadog APM client for Node.js. It provides automatic instrumentation for various libraries, including DNS operations. Compared to @opentelemetry/instrumentation-dns, dd-trace is more tightly integrated with the Datadog ecosystem and offers additional features like custom metrics and traces.
newrelic is the New Relic Node.js agent that provides automatic instrumentation for a wide range of Node.js modules, including DNS. It offers comprehensive monitoring and analytics features. Compared to @opentelemetry/instrumentation-dns, newrelic provides a more extensive set of features but is tied to the New Relic platform.
elastic-apm-node is the official Elastic APM agent for Node.js. It provides automatic instrumentation for DNS queries and other Node.js modules. Compared to @opentelemetry/instrumentation-dns, elastic-apm-node is designed to work seamlessly with the Elastic APM stack, offering deep integration with Elasticsearch and Kibana.
This module provides automatic instrumentation for the dns
module, which may be loaded using the @opentelemetry/sdk-trace-node
package and is included in the @opentelemetry/auto-instrumentations-node
bundle.
If total installation size is not constrained, it is recommended to use the @opentelemetry/auto-instrumentations-node
bundle with @opentelemetry/sdk-node for the most seamless instrumentation experience.
Maturity | Component Owner | Compatibility |
---|---|---|
Unmaintained | N/A | API 1.0+ SDK 1.0+ |
npm install --save @opentelemetry/instrumentation-dns
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { DnsInstrumentation } = require('@opentelemetry/instrumentation-dns');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new DnsInstrumentation({
// see under for available configuration
}),
],
});
Dns instrumentation has currently one option. You can set the following:
Options | Type | Description |
---|---|---|
ignoreHostnames | `IgnoreMatcher | IgnoreMatcher[]` |
Apache 2.0 - See LICENSE for more information.
FAQs
OpenTelemetry instrumentation for `node:dns` name resolution module
The npm package @opentelemetry/instrumentation-dns receives a total of 788,923 weekly downloads. As such, @opentelemetry/instrumentation-dns popularity was classified as popular.
We found that @opentelemetry/instrumentation-dns demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.