JSPM

  • Created
  • Published
  • Downloads 10338843
  • Score
    100M100P100Q246968F
  • License Apache-2.0

OpenTelemetry Koa automatic instrumentation package.

Package Exports

  • @opentelemetry/instrumentation-koa

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@opentelemetry/instrumentation-koa) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

OpenTelemetry Koa Instrumentation for Node.js

NPM Published Version dependencies devDependencies Apache License

This module provides automatic instrumentation for Koa.

For automatic instrumentation see the @opentelemetry/node package.

Installation

npm install --save @opentelemetry/instrumentation-koa

Supported Versions

  • Koa ^2.0.0

Usage

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

const { NodeTracerProvider } = require('@opentelemetry/node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { KoaInstrumentation } = require('@opentelemetry/instrumentation-koa');

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

registerInstrumentations({
  instrumentations: [
    new KoaInstrumentation(),
  ],
});

See examples/koa for a short example using both Koa and @koa/router

Koa Packages

This package provides automatic tracing for middleware added using either the core Koa package or the @koa/router package.

License

Apache 2.0 - See LICENSE for more information.