@opentelemetry/instrumentation-fastify
Advanced tools
Comparing version 0.31.0 to 0.31.1
@@ -54,3 +54,3 @@ "use strict"; | ||
instrumentation._wrap(reply, 'send', instrumentation._patchSend()); | ||
const rpcMetadata = core_1.getRPCMetadata(api_1.context.active()); | ||
const rpcMetadata = (0, core_1.getRPCMetadata)(api_1.context.active()); | ||
const routeName = request.routerPath; | ||
@@ -73,3 +73,3 @@ if (routeName && (rpcMetadata === null || rpcMetadata === void 0 ? void 0 : rpcMetadata.type) === core_1.RPCType.HTTP) { | ||
const reply = args[1]; | ||
const span = utils_1.startSpan(reply, instrumentation.tracer, spanName, { | ||
const span = (0, utils_1.startSpan)(reply, instrumentation.tracer, spanName, { | ||
[AttributeNames_1.AttributeNames.FASTIFY_TYPE]: AttributeNames_1.FastifyTypes.MIDDLEWARE, | ||
@@ -83,3 +83,3 @@ [AttributeNames_1.AttributeNames.PLUGIN_NAME]: pluginName, | ||
args[args.length - 1] = function (...doneArgs) { | ||
utils_1.endSpan(reply); | ||
(0, utils_1.endSpan)(reply); | ||
origDone.apply(this, doneArgs); | ||
@@ -89,3 +89,3 @@ }; | ||
return api_1.context.with(api_1.trace.setSpan(api_1.context.active(), span), () => { | ||
return utils_1.safeExecuteInTheMiddleMaybePromise(() => { | ||
return (0, utils_1.safeExecuteInTheMiddleMaybePromise)(() => { | ||
return original.apply(this, args); | ||
@@ -102,3 +102,3 @@ }, err => { | ||
if (!syncFunctionWithDone) { | ||
utils_1.endSpan(reply); | ||
(0, utils_1.endSpan)(reply); | ||
} | ||
@@ -152,3 +152,3 @@ }); | ||
} | ||
return instrumentation_1.safeExecuteInTheMiddle(() => { | ||
return (0, instrumentation_1.safeExecuteInTheMiddle)(() => { | ||
return original.apply(this, args); | ||
@@ -159,3 +159,3 @@ }, err => { | ||
} | ||
utils_1.endSpan(this, err); | ||
(0, utils_1.endSpan)(this, err); | ||
}); | ||
@@ -184,5 +184,5 @@ }; | ||
} | ||
const span = utils_1.startSpan(reply, instrumentation.tracer, spanName, spanAttributes); | ||
const span = (0, utils_1.startSpan)(reply, instrumentation.tracer, spanName, spanAttributes); | ||
if (instrumentation.getConfig().requestHook) { | ||
instrumentation_1.safeExecuteInTheMiddle(() => instrumentation.getConfig().requestHook(span, { request }), e => { | ||
(0, instrumentation_1.safeExecuteInTheMiddle)(() => instrumentation.getConfig().requestHook(span, { request }), e => { | ||
if (e) { | ||
@@ -189,0 +189,0 @@ instrumentation._diag.error('request hook failed', e); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.31.0"; | ||
export declare const VERSION = "0.31.1"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.31.0'; | ||
exports.VERSION = '0.31.1'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-fastify", | ||
"version": "0.31.0", | ||
"version": "0.31.1", | ||
"description": "OpenTelemetry fastify automatic instrumentation package.", | ||
@@ -51,3 +51,3 @@ "main": "build/src/index.js", | ||
"@opentelemetry/context-async-hooks": "^1.8.0", | ||
"@opentelemetry/instrumentation-http": "0.34.0", | ||
"@opentelemetry/instrumentation-http": "0.35.1", | ||
"@opentelemetry/sdk-trace-base": "^1.8.0", | ||
@@ -64,11 +64,11 @@ "@opentelemetry/sdk-trace-node": "^1.8.0", | ||
"ts-mocha": "10.0.0", | ||
"typescript": "4.3.5" | ||
"typescript": "4.4.4" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/core": "^1.8.0", | ||
"@opentelemetry/instrumentation": "^0.34.0", | ||
"@opentelemetry/instrumentation": "^0.35.1", | ||
"@opentelemetry/semantic-conventions": "^1.0.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-fastify#readme", | ||
"gitHead": "59fa57cfd0dff4ae0e6f3833dff73c55dfd79ee5" | ||
"gitHead": "63e0fc9b6b862f74304abf0343c506a5bd415191" | ||
} |
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
49111
+ Added@opentelemetry/instrumentation@0.35.1(transitive)
- Removed@opentelemetry/instrumentation@0.34.0(transitive)