Socket
Book a DemoInstallSign in
Socket

@opentelemetry/instrumentation-http

Package Overview
Dependencies
Maintainers
3
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-http

OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules

0.203.0
latest
Source
npmnpm
Version published
Weekly downloads
6.8M
1.69%
Maintainers
3
Weekly downloads
 
Created

What is @opentelemetry/instrumentation-http?

The @opentelemetry/instrumentation-http package is part of the OpenTelemetry project, which provides a collection of tools, APIs, and SDKs to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software's performance and behavior. This specific package provides automatic instrumentation for HTTP and HTTPS requests in Node.js applications, allowing developers to capture detailed information about incoming and outgoing requests.

What are @opentelemetry/instrumentation-http's main functionalities?

Automatic Tracing of HTTP Requests

This feature automatically traces all HTTP and HTTPS requests made or received by your application. The code sample initializes a NodeTracerProvider, registers it, and then enables the HTTP instrumentation to start tracing HTTP requests.

const { NodeTracerProvider } = require('@opentelemetry/node');
const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');

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

const httpInstrumentation = new HttpInstrumentation();
httpInstrumentation.enable();

Configurable Instrumentation

This feature allows developers to configure which requests should be ignored by the instrumentation. In the code sample, the instrumentation is configured to ignore incoming requests to '/healthz' and outgoing requests to 'example.com'.

const { HttpInstrumentation } = require('@opentelemetry/instrumentation-http');
const httpInstrumentation = new HttpInstrumentation({
  ignoreIncomingPaths: [ /healthz/ ],
  ignoreOutgoingUrls: [ /example.com/ ]
});
httpInstrumentation.enable();

Other packages similar to @opentelemetry/instrumentation-http

Keywords

opentelemetry

FAQs

Package last updated on 09 Jul 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.