@opentelemetry/instrumentation-graphql
Advanced tools
Comparing version 0.35.2 to 0.36.0
@@ -27,3 +27,2 @@ "use strict"; | ||
const version_1 = require("./version"); | ||
const api = require("@opentelemetry/api"); | ||
const DEFAULT_CONFIG = { | ||
@@ -56,3 +55,4 @@ mergeItems: false, | ||
//types and/cannot import function but only types | ||
(moduleExports) => { | ||
(moduleExports, moduleVersion) => { | ||
this._diag.debug(`Applying patch for graphql@${moduleVersion} execute`); | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.execute)) { | ||
@@ -63,4 +63,5 @@ this._unwrap(moduleExports, 'execute'); | ||
return moduleExports; | ||
}, moduleExports => { | ||
}, (moduleExports, moduleVersion) => { | ||
if (moduleExports) { | ||
this._diag.debug(`Removing patch for graphql@${moduleVersion} execute`); | ||
this._unwrap(moduleExports, 'execute'); | ||
@@ -71,4 +72,5 @@ } | ||
_addPatchingParser() { | ||
return new instrumentation_1.InstrumentationNodeModuleFile('graphql/language/parser.js', supportedVersions, moduleExports => { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.execute)) { | ||
return new instrumentation_1.InstrumentationNodeModuleFile('graphql/language/parser.js', supportedVersions, (moduleExports, moduleVersion) => { | ||
this._diag.debug(`Applying patch for graphql@${moduleVersion} parse`); | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.parse)) { | ||
this._unwrap(moduleExports, 'parse'); | ||
@@ -78,4 +80,5 @@ } | ||
return moduleExports; | ||
}, moduleExports => { | ||
}, (moduleExports, moduleVersion) => { | ||
if (moduleExports) { | ||
this._diag.debug(`Removing patch for graphql@${moduleVersion} parse`); | ||
this._unwrap(moduleExports, 'parse'); | ||
@@ -86,4 +89,5 @@ } | ||
_addPatchingValidate() { | ||
return new instrumentation_1.InstrumentationNodeModuleFile('graphql/validation/validate.js', supportedVersions, moduleExports => { | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.execute)) { | ||
return new instrumentation_1.InstrumentationNodeModuleFile('graphql/validation/validate.js', supportedVersions, (moduleExports, moduleVersion) => { | ||
this._diag.debug(`Applying patch for graphql@${moduleVersion} validate`); | ||
if ((0, instrumentation_1.isWrapped)(moduleExports.validate)) { | ||
this._unwrap(moduleExports, 'validate'); | ||
@@ -93,4 +97,5 @@ } | ||
return moduleExports; | ||
}, moduleExports => { | ||
}, (moduleExports, moduleVersion) => { | ||
if (moduleExports) { | ||
this._diag.debug(`Removing patch for graphql@${moduleVersion} validate`); | ||
this._unwrap(moduleExports, 'validate'); | ||
@@ -167,3 +172,3 @@ } | ||
if (err) { | ||
api.diag.error('Error running response hook', err); | ||
this._diag.error('Error running response hook', err); | ||
} | ||
@@ -170,0 +175,0 @@ (0, utils_1.endSpan)(span, undefined); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.35.2"; | ||
export declare const VERSION = "0.36.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.35.2'; | ||
exports.VERSION = '0.36.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-graphql", | ||
"version": "0.35.2", | ||
"version": "0.36.0", | ||
"description": "OpenTelemetry @opentelemetry/instrumentation-graphql automatic instrumentation package.", | ||
@@ -38,6 +38,3 @@ "main": "build/src/index.js", | ||
"build/src/**/*.js.map", | ||
"build/src/**/*.d.ts", | ||
"doc", | ||
"LICENSE", | ||
"README.md" | ||
"build/src/**/*.d.ts" | ||
], | ||
@@ -65,6 +62,6 @@ "publishConfig": { | ||
"dependencies": { | ||
"@opentelemetry/instrumentation": "^0.44.0" | ||
"@opentelemetry/instrumentation": "^0.45.1" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-graphql#readme", | ||
"gitHead": "a8c225d2febcac561a70ca586d3efd5a84f9f3fa" | ||
"gitHead": "607d375595da3ab51b7f773ac360900121c4361b" | ||
} |
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
126537
1028
+ Added@opentelemetry/instrumentation@0.45.1(transitive)
- Removed@opentelemetry/instrumentation@0.44.0(transitive)