@opentelemetry/instrumentation-router
Advanced tools
Comparing version 0.36.0 to 0.37.0
import { InstrumentationConfig, InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
export default class RouterInstrumentation extends InstrumentationBase<any> { | ||
export default class RouterInstrumentation extends InstrumentationBase { | ||
constructor(config?: InstrumentationConfig); | ||
private _moduleVersion?; | ||
init(): InstrumentationNodeModuleDefinition<any>; | ||
init(): InstrumentationNodeModuleDefinition; | ||
private _requestHandlerPatcher; | ||
@@ -7,0 +7,0 @@ private _errorHandlerPatcher; |
@@ -32,11 +32,6 @@ "use strict"; | ||
const module = new instrumentation_1.InstrumentationNodeModuleDefinition(constants.MODULE_NAME, constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => { | ||
api.diag.debug(`Applying patch for ${constants.MODULE_NAME}@${moduleVersion}`); | ||
this._moduleVersion = moduleVersion; | ||
return moduleExports; | ||
}, (moduleExports, moduleVersion) => { | ||
api.diag.debug(`Removing patch for ${constants.MODULE_NAME}@${moduleVersion}`); | ||
return moduleExports; | ||
}); | ||
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('router/lib/layer.js', constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => { | ||
api.diag.debug(`Applying patch for "lib/layer.js" of ${constants.MODULE_NAME}@${moduleVersion}`); | ||
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('router/lib/layer.js', constants.SUPPORTED_VERSIONS, moduleExports => { | ||
const Layer = moduleExports; | ||
@@ -52,4 +47,3 @@ if ((0, instrumentation_1.isWrapped)(Layer.prototype.handle_request)) { | ||
return moduleExports; | ||
}, (moduleExports, moduleVersion) => { | ||
api.diag.debug(`Removing patch for "lib/layer.js" of ${constants.MODULE_NAME}@${moduleVersion}`); | ||
}, moduleExports => { | ||
const Layer = moduleExports; | ||
@@ -102,3 +96,3 @@ this._unwrap(Layer.prototype, 'handle_request'); | ||
[AttributeNames_1.default.TYPE]: type, | ||
[semantic_conventions_1.SemanticAttributes.HTTP_ROUTE]: route, | ||
[semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: route, | ||
}; | ||
@@ -105,0 +99,0 @@ const parent = api.context.active(); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.36.0"; | ||
export declare const VERSION = "0.37.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.36.0'; | ||
exports.VERSION = '0.37.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-router", | ||
"version": "0.36.0", | ||
"version": "0.37.0", | ||
"description": "OpenTelemetry Router automatic instrumentation package", | ||
@@ -59,7 +59,7 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/instrumentation": "^0.50.0", | ||
"@opentelemetry/semantic-conventions": "^1.0.0" | ||
"@opentelemetry/instrumentation": "^0.51.0", | ||
"@opentelemetry/semantic-conventions": "^1.22.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-router#readme", | ||
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb" | ||
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973" | ||
} |
@@ -43,2 +43,12 @@ # OpenTelemetry Router Instrumentation for Node.js | ||
## Semantic Conventions | ||
This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) | ||
Attributes collected: | ||
| Attribute | Short Description | | ||
| ------------ | ---------------------------------- | | ||
| `http.route` | The matched route (path template). | | ||
## Useful links | ||
@@ -45,0 +55,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68
51595
344
+ Added@opentelemetry/api-logs@0.51.1(transitive)
+ Added@opentelemetry/instrumentation@0.51.1(transitive)
+ Addedacorn-import-attributes@1.9.5(transitive)
+ Addedimport-in-the-middle@1.7.4(transitive)
- Removed@opentelemetry/api-logs@0.50.0(transitive)
- Removed@opentelemetry/instrumentation@0.50.0(transitive)
- Removedacorn-import-assertions@1.9.0(transitive)
- Removedimport-in-the-middle@1.7.1(transitive)