@opentelemetry/instrumentation-restify
Advanced tools
Comparing version 0.37.0 to 0.38.0
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
import type { RestifyInstrumentationConfig } from './types'; | ||
export declare class RestifyInstrumentation extends InstrumentationBase<any> { | ||
export declare class RestifyInstrumentation extends InstrumentationBase { | ||
constructor(config?: RestifyInstrumentationConfig); | ||
@@ -9,3 +9,3 @@ private _moduleVersion?; | ||
getConfig(): RestifyInstrumentationConfig; | ||
init(): InstrumentationNodeModuleDefinition<any>; | ||
init(): InstrumentationNodeModuleDefinition; | ||
private _middlewarePatcher; | ||
@@ -12,0 +12,0 @@ private _methodPatcher; |
@@ -21,3 +21,3 @@ "use strict"; | ||
const types_1 = require("./types"); | ||
const AttributeNames = require("./enums/AttributeNames"); | ||
const AttributeNames_1 = require("./enums/AttributeNames"); | ||
const version_1 = require("./version"); | ||
@@ -29,3 +29,2 @@ const constants = require("./constants"); | ||
const core_1 = require("@opentelemetry/core"); | ||
const { diag } = api; | ||
class RestifyInstrumentation extends instrumentation_1.InstrumentationBase { | ||
@@ -47,4 +46,3 @@ constructor(config = {}) { | ||
}); | ||
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('restify/lib/server.js', constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => { | ||
diag.debug(`Applying patch for ${constants.MODULE_NAME}@${moduleVersion}`); | ||
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('restify/lib/server.js', constants.SUPPORTED_VERSIONS, moduleExports => { | ||
this._isDisabled = false; | ||
@@ -65,4 +63,3 @@ const Server = moduleExports; | ||
return moduleExports; | ||
}, (moduleExports, moduleVersion) => { | ||
diag.debug(`Removing patch for ${constants.MODULE_NAME}@${moduleVersion}`); | ||
}, moduleExports => { | ||
this._isDisabled = true; | ||
@@ -117,7 +114,7 @@ if (moduleExports) { | ||
const attributes = { | ||
[AttributeNames.AttributeNames.NAME]: fnName, | ||
[AttributeNames.AttributeNames.VERSION]: this._moduleVersion || 'n/a', | ||
[AttributeNames.AttributeNames.TYPE]: metadata.type, | ||
[AttributeNames.AttributeNames.METHOD]: metadata.methodName, | ||
[semantic_conventions_1.SemanticAttributes.HTTP_ROUTE]: route, | ||
[AttributeNames_1.AttributeNames.NAME]: fnName, | ||
[AttributeNames_1.AttributeNames.VERSION]: this._moduleVersion || 'n/a', | ||
[AttributeNames_1.AttributeNames.TYPE]: metadata.type, | ||
[AttributeNames_1.AttributeNames.METHOD]: metadata.methodName, | ||
[semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: route, | ||
}; | ||
@@ -124,0 +121,0 @@ const span = this.tracer.startSpan(spanName, { |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.37.0"; | ||
export declare const VERSION = "0.38.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.37.0'; | ||
exports.VERSION = '0.38.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-restify", | ||
"version": "0.37.0", | ||
"version": "0.38.0", | ||
"description": "OpenTelemetry restify automatic instrumentation package", | ||
@@ -65,7 +65,7 @@ "main": "build/src/index.js", | ||
"@opentelemetry/core": "^1.8.0", | ||
"@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-restify#readme", | ||
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb" | ||
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973" | ||
} |
@@ -65,2 +65,12 @@ # OpenTelemetry Restify 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 | ||
@@ -67,0 +77,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
90
58833
421
+ 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)