Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation-koa

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-koa - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

2

build/src/utils.js

@@ -28,3 +28,3 @@ "use strict";

[types_1.AttributeNames.KOA_TYPE]: types_1.KoaLayerType.ROUTER,
[semantic_conventions_1.HttpAttribute.HTTP_ROUTE]: layerPath,
[semantic_conventions_1.SemanticAttributes.HTTP_ROUTE]: layerPath,
},

@@ -31,0 +31,0 @@ name: `router - ${layerPath}`,

@@ -1,2 +0,2 @@

export declare const VERSION = "0.15.0";
export declare const VERSION = "0.16.0";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.15.0';
exports.VERSION = '0.16.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-koa",
"version": "0.15.0",
"version": "0.16.0",
"description": "OpenTelemetry Koa automatic instrumentation package.",

@@ -47,5 +47,5 @@ "main": "build/src/index.js",

"@koa/router": "9.4.0",
"@opentelemetry/context-async-hooks": "0.18.2",
"@opentelemetry/node": "0.18.2",
"@opentelemetry/tracing": "0.18.2",
"@opentelemetry/context-async-hooks": "0.19.0",
"@opentelemetry/node": "0.19.0",
"@opentelemetry/tracing": "0.19.0",
"@types/koa": "2.11.4",

@@ -62,3 +62,2 @@ "@types/koa__router": "8.0.2",

"ts-mocha": "8.0.0",
"ts-node": "9.0.0",
"tslint-consistent-codestyle": "1.16.0",

@@ -69,8 +68,7 @@ "tslint-microsoft-contrib": "6.2.0",

"dependencies": {
"@opentelemetry/api": "^0.18.0",
"@opentelemetry/core": "^0.18.0",
"@opentelemetry/instrumentation": "^0.18.0",
"@opentelemetry/semantic-conventions": "^0.18.0"
"@opentelemetry/api": "^1.0.0-rc.0",
"@opentelemetry/instrumentation": "^0.19.0",
"@opentelemetry/semantic-conventions": "^0.19.0"
},
"gitHead": "a2de7757da17a026433f0735035f65f7f88f1666"
"gitHead": "5ecccc916e8f4eecaf6629a0350fc672edcba1be"
}

@@ -25,33 +25,7 @@ # OpenTelemetry Koa Instrumentation for Node.js

To load all of the [default supported plugins](https://github.com/open-telemetry/opentelemetry-js#plugins), use the 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.
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
const provider = new NodeTracerProvider();
provider.register();
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
registerInstrumentations({
tracerProvider: provider,
});
```
If instead you would just want to load a specific instrumentation only (**koa** in this case);
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
const { KoaInstrumentation } = require('@opentelemetry/instrumentation-koa');
const provider = new NodeTracerProvider();
provider.register();
const koaInstrumentation = new KoaInstrumentation();
koaInstrumentation.setTracerProvider(provider);
```
You can combine loading default plugins and KoaInstrumentation at the same time:
```js
const { NodeTracerProvider } = require('@opentelemetry/node');
const { KoaInstrumentation } = require('@opentelemetry/instrumentation-koa');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();

@@ -58,0 +32,0 @@ provider.register();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc