@opentelemetry/instrumentation-router
Advanced tools
Comparing version 0.38.0 to 0.39.0
export declare const MODULE_NAME = "router"; | ||
export declare const SUPPORTED_VERSIONS: string[]; | ||
export declare const ROUTE_ROUTER_FN = "function router(req, res, next) {\n router.handle(req, res, next)\n }"; | ||
export declare const ROUTER_HANDLE_FN = "function handle(req, res, next) {\n route.dispatch(req, res, next)\n }"; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -18,5 +18,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ROUTER_HANDLE_FN = exports.ROUTE_ROUTER_FN = exports.SUPPORTED_VERSIONS = exports.MODULE_NAME = void 0; | ||
exports.ROUTER_HANDLE_FN = exports.ROUTE_ROUTER_FN = exports.MODULE_NAME = void 0; | ||
exports.MODULE_NAME = 'router'; | ||
exports.SUPPORTED_VERSIONS = ['1']; | ||
// Router.prototype.handle | ||
@@ -23,0 +22,0 @@ exports.ROUTE_ROUTER_FN = `function router(req, res, next) { |
@@ -1,5 +0,3 @@ | ||
import RouterInstrumentation from './instrumentation'; | ||
export { RouterInstrumentation }; | ||
export default RouterInstrumentation; | ||
export * from './instrumentation'; | ||
export * from './enums/AttributeNames'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -28,7 +28,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RouterInstrumentation = void 0; | ||
const instrumentation_1 = require("./instrumentation"); | ||
exports.RouterInstrumentation = instrumentation_1.default; | ||
exports.default = instrumentation_1.default; | ||
__exportStar(require("./instrumentation"), exports); | ||
__exportStar(require("./enums/AttributeNames"), exports); | ||
//# sourceMappingURL=index.js.map |
import { InstrumentationConfig, InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
export default class RouterInstrumentation extends InstrumentationBase { | ||
export declare class RouterInstrumentation extends InstrumentationBase { | ||
constructor(config?: InstrumentationConfig); | ||
@@ -4,0 +4,0 @@ private _moduleVersion?; |
@@ -18,2 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RouterInstrumentation = void 0; | ||
const api = require("@opentelemetry/api"); | ||
@@ -27,2 +28,3 @@ const instrumentation_1 = require("@opentelemetry/instrumentation"); | ||
const LayerType_1 = require("./enums/LayerType"); | ||
const supportedVersions = ['>=1.0.0 <2']; | ||
class RouterInstrumentation extends instrumentation_1.InstrumentationBase { | ||
@@ -33,7 +35,7 @@ constructor(config = {}) { | ||
init() { | ||
const module = new instrumentation_1.InstrumentationNodeModuleDefinition(constants.MODULE_NAME, constants.SUPPORTED_VERSIONS, (moduleExports, moduleVersion) => { | ||
const module = new instrumentation_1.InstrumentationNodeModuleDefinition(constants.MODULE_NAME, supportedVersions, (moduleExports, moduleVersion) => { | ||
this._moduleVersion = moduleVersion; | ||
return moduleExports; | ||
}); | ||
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('router/lib/layer.js', constants.SUPPORTED_VERSIONS, moduleExports => { | ||
module.files.push(new instrumentation_1.InstrumentationNodeModuleFile('router/lib/layer.js', supportedVersions, moduleExports => { | ||
const Layer = moduleExports; | ||
@@ -124,3 +126,3 @@ if ((0, instrumentation_1.isWrapped)(Layer.prototype.handle_request)) { | ||
} | ||
exports.default = RouterInstrumentation; | ||
exports.RouterInstrumentation = RouterInstrumentation; | ||
//# sourceMappingURL=instrumentation.js.map |
@@ -1,3 +0,3 @@ | ||
export declare const PACKAGE_VERSION = "0.38.0"; | ||
export declare const PACKAGE_VERSION = "0.39.0"; | ||
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-router"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,4 +20,4 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.PACKAGE_VERSION = '0.38.0'; | ||
exports.PACKAGE_VERSION = '0.39.0'; | ||
exports.PACKAGE_NAME = '@opentelemetry/instrumentation-router'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-router", | ||
"version": "0.38.0", | ||
"version": "0.39.0", | ||
"description": "OpenTelemetry instrumentation for `router` http middleware router", | ||
@@ -14,2 +14,3 @@ "main": "build/src/index.js", | ||
"lint:fix": "eslint . --ext .ts --fix", | ||
"lint:readme": "node ../../../scripts/lint-readme.js", | ||
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/instrumentation-router --include-dependencies", | ||
@@ -64,3 +65,3 @@ "prewatch": "npm run precompile", | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-router#readme", | ||
"gitHead": "0af1b70f7c3c9763c85ac51fa5e334c1e1512020" | ||
"gitHead": "ad8436d6a4174f2288cb939080cd4e74da94b0d7" | ||
} |
@@ -20,3 +20,3 @@ # OpenTelemetry Router Instrumentation for Node.js | ||
- `>=1.0.0` | ||
- [`router`](https://www.npmjs.com/package/router) versions `>=1.0.0 <2` | ||
@@ -23,0 +23,0 @@ ## Usage |
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
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
51473
341