Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@opentelemetry/instrumentation-dns
Advanced tools
OpenTelemetry instrumentation for `node:dns` name resolution module
@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.
Compatible with OpenTelemetry JS API and SDK 1.0+
.
Maturity | Component Owner | Compatibility |
---|---|---|
Unmaintained | N/A | API 1.0+ SDK 1.0+ |
npm install --save @opentelemetry/instrumentation-dns
>=14
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[] | DNS instrumentation will not trace all requests that match hostnames |
This package does not currently generate any attributes from semantic conventions.
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 874,876 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.