@opentelemetry/plugin-http
OpenTelemetry http automatic instrumentation package.
Last updated 4 years ago by dyladan .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @opentelemetry/plugin-http 
SYNC missed versions from official npm registry.

OpenTelemetry HTTP Instrumentation for Node.js

Gitter chat NPM Published Version dependencies devDependencies Apache License

This module provides automatic instrumentation for http.

For automatic instrumentation see the @opentelemetry/node package.

Installation

npm install --save @opentelemetry/plugin-http

Usage

OpenTelemetry HTTP Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.

To load a specific plugin (HTTP in this case), specify it in the Node Tracer's configuration.

const { NodeTracerProvider } = require('@opentelemetry/node');

const provider = new NodeTracerProvider({
  plugins: {
    http: {
      enabled: true,
      // You may use a package name or absolute path to the file.
      path: '@opentelemetry/plugin-http',
      // http plugin options
    }
  }
});

To load all of the supported plugins, use below approach. Each plugin is only loaded when the module that it patches is loaded; in other words, there is no computational overhead for listing plugins for unused modules.

const { NodeTracerProvider } = require('@opentelemetry/node');

const provider = new NodeTracerProvider();

See examples/http for a short example.

Http Plugin Options

Http plugin has few options available to choose from. You can set the following:

Options Type Description
applyCustomAttributesOnSpan HttpCustomAttributeFunction Function for adding custom attributes
requestHook HttpRequestCustomAttributeFunction Function for adding custom attributes before request is handled
responseHook HttpResponseCustomAttributeFunction Function for adding custom attributes before response is handled
ignoreIncomingPaths IgnoreMatcher[] Http plugin will not trace all incoming requests that match paths
ignoreOutgoingUrls IgnoreMatcher[] Http plugin will not trace all outgoing requests that match urls
serverName string The primary server name of the matched virtual host.
requireParentforOutgoingSpans Boolean Require that is a parent span to create new span for outgoing requests.
requireParentforIncomingSpans Boolean Require that is a parent span to create new span for incoming requests.

Useful links

License

Apache 2.0 - See LICENSE for more information.

Current Tags

  • 0.18.3-alpha.11                                ...           canary (4 years ago)
  • 0.18.2                                ...           latest (4 years ago)

83 Versions

  • 0.18.3-alpha.11                                ...           4 years ago
  • 0.18.3-alpha.10                                ...           4 years ago
  • 0.18.3-alpha.9                                ...           4 years ago
  • 0.18.3-alpha.7                                ...           4 years ago
  • 0.18.3-alpha.5                                ...           4 years ago
  • 0.18.3-alpha.4                                ...           4 years ago
  • 0.18.3-alpha.3                                ...           4 years ago
  • 0.18.3-alpha.1                                ...           4 years ago
  • 0.18.2 [deprecated]           ...           4 years ago
  • 0.18.3-alpha.2                                ...           4 years ago
  • 0.18.2-alpha.1                                ...           4 years ago
  • 0.18.1 [deprecated]           ...           4 years ago
  • 0.18.2-alpha.81                                ...           4 years ago
  • 0.18.1-alpha.26                                ...           4 years ago
  • 0.18.1-alpha.24                                ...           4 years ago
  • 0.18.1-alpha.23                                ...           4 years ago
  • 0.18.1-alpha.21                                ...           4 years ago
  • 0.18.1-alpha.20                                ...           4 years ago
  • 0.18.1-alpha.16                                ...           4 years ago
  • 0.18.1-alpha.13                                ...           4 years ago
  • 0.18.1-alpha.3                                ...           4 years ago
  • 0.18.0 [deprecated]           ...           4 years ago
  • 0.18.1-alpha.12                                ...           4 years ago
  • 0.17.1-alpha.11                                ...           4 years ago
  • 0.17.1-alpha.10                                ...           4 years ago
  • 0.17.1-alpha.8                                ...           4 years ago
  • 0.17.1-alpha.5                                ...           4 years ago
  • 0.17.1-alpha.4                                ...           4 years ago
  • 0.17.1-alpha.3                                ...           4 years ago
  • 0.17.1-alpha.2                                ...           4 years ago
  • 0.17.1-alpha.21                                ...           4 years ago
  • 0.17.0 [deprecated]           ...           4 years ago
  • 0.16.1-alpha.20                                ...           4 years ago
  • 0.16.1-alpha.18                                ...           4 years ago
  • 0.16.1-alpha.15                                ...           4 years ago
  • 0.16.1-alpha.14                                ...           4 years ago
  • 0.16.1-alpha.12                                ...           4 years ago
  • 0.16.1-alpha.11                                ...           4 years ago
  • 0.16.1-alpha.10                                ...           4 years ago
  • 0.16.1-alpha.6                                ...           4 years ago
  • 0.16.0 [deprecated]           ...           4 years ago
  • 0.15.0 [deprecated]           ...           4 years ago
  • 0.14.0 [deprecated]           ...           4 years ago
  • 0.13.0 [deprecated]           ...           4 years ago
  • 0.12.1-alpha.7                                ...           4 years ago
  • 0.12.1-alpha.4                                ...           4 years ago
  • 0.12.0 [deprecated]           ...           4 years ago
  • 0.12.1-alpha.54                                ...           4 years ago
  • 0.11.1-alpha.53                                ...           4 years ago
  • 0.11.1-alpha.44                                ...           4 years ago
  • 0.11.1-alpha.36                                ...           4 years ago
  • 0.11.1-alpha.35                                ...           4 years ago
  • 0.11.1-alpha.15                                ...           4 years ago
  • 0.11.0 [deprecated]           ...           4 years ago
  • 0.11.1-alpha.48                                ...           4 years ago
  • 0.10.3-alpha.41                                ...           4 years ago
  • 0.10.3-alpha.40                                ...           4 years ago
  • 0.10.3-alpha.35                                ...           4 years ago
  • 0.10.3-alpha.34                                ...           4 years ago
  • 0.10.3-alpha.28                                ...           4 years ago
  • 0.10.3-canary.0                                ...           4 years ago
  • 0.10.2 [deprecated]           ...           4 years ago
  • 0.10.1 [deprecated]           ...           4 years ago
  • 0.10.0 [deprecated]           ...           4 years ago
  • 0.9.0 [deprecated]           ...           4 years ago
  • 0.8.3 [deprecated]           ...           4 years ago
  • 0.8.2 [deprecated]           ...           4 years ago
  • 0.8.1 [deprecated]           ...           4 years ago
  • 0.8.0 [deprecated]           ...           5 years ago
  • 0.7.0 [deprecated]           ...           5 years ago
  • 0.6.1 [deprecated]           ...           5 years ago
  • 0.6.0 [deprecated]           ...           5 years ago
  • 0.5.2 [deprecated]           ...           5 years ago
  • 0.5.1 [deprecated]           ...           5 years ago
  • 0.5.0 [deprecated]           ...           5 years ago
  • 0.4.0 [deprecated]           ...           5 years ago
  • 0.3.3 [deprecated]           ...           5 years ago
  • 0.3.2 [deprecated]           ...           5 years ago
  • 0.3.1 [deprecated]           ...           5 years ago
  • 0.3.0 [deprecated]           ...           5 years ago
  • 0.2.0 [deprecated]           ...           5 years ago
  • 0.1.1 [deprecated]           ...           5 years ago
  • 0.1.0 [deprecated]           ...           5 years ago
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (27)

© 2010 - cnpmjs.org x YWFE | Home | YWFE