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
This module provides automatic instrumentation for Koa.
For automatic instrumentation see the @opentelemetry/node package.
Installation
npm install --save @opentelemetry/instrumentation-koaSupported 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.
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more about OpenTelemetry JavaScript: https://github.com/open-telemetry/opentelemetry-js
- For help or feedback on this project, join us in GitHub Discussions
License
Apache 2.0 - See LICENSE for more information.