datadog-lambda-js
Advanced tools
Comparing version 5.72.0 to 5.73.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.datadogLambdaVersion = void 0; | ||
exports.datadogLambdaVersion = "5.72.0"; | ||
exports.datadogLambdaVersion = "5.73.0"; | ||
//# sourceMappingURL=constants.js.map |
@@ -202,3 +202,3 @@ "use strict"; | ||
_a.sent(); | ||
return [4 /*yield*/, traceListener.onCompleteInvocation()]; | ||
return [4 /*yield*/, traceListener.onCompleteInvocation(error)]; | ||
case 11: | ||
@@ -205,0 +205,0 @@ _a.sent(); |
@@ -57,5 +57,5 @@ import { Context } from "aws-lambda"; | ||
onEndingInvocation(event: any, result: any, shouldTagPayload?: boolean): void; | ||
onCompleteInvocation(): Promise<void>; | ||
onCompleteInvocation(error?: any): Promise<void>; | ||
onWrap<T = (...args: any[]) => any>(func: T): T; | ||
} | ||
//# sourceMappingURL=listener.d.ts.map |
@@ -150,3 +150,3 @@ "use strict"; | ||
}; | ||
TraceListener.prototype.onCompleteInvocation = function () { | ||
TraceListener.prototype.onCompleteInvocation = function (error) { | ||
var _a; | ||
@@ -168,2 +168,6 @@ return __awaiter(this, void 0, void 0, function () { | ||
(0, utils_1.logDebug)("Finishing inferred span"); | ||
if (error && !this.inferredSpan.isAsync()) { | ||
(0, utils_1.logDebug)("Setting error tag to inferred span"); | ||
this.inferredSpan.setTag("error", error); | ||
} | ||
finishTime = this.inferredSpan.isAsync() ? (_a = this.wrappedCurrentSpan) === null || _a === void 0 ? void 0 : _a.startTime() : Date.now(); | ||
@@ -170,0 +174,0 @@ this.inferredSpan.finish(finishTime); |
@@ -57,2 +57,3 @@ "use strict"; | ||
var path = event.rawPath || event.requestContext.path || event.requestContext.routeKey; | ||
var resourcePath = event.rawPath || event.requestContext.resourcePath || event.requestContext.routeKey; | ||
var method; | ||
@@ -65,3 +66,3 @@ if (event.requestContext.httpMethod) { | ||
} | ||
var resourceName = [domain, path].join(" "); | ||
var resourceName = [method || domain, resourcePath].join(" "); | ||
options.tags = { | ||
@@ -68,0 +69,0 @@ operation_name: "aws.apigateway", |
{ | ||
"name": "datadog-lambda-js", | ||
"version": "5.72.0", | ||
"version": "5.73.0", | ||
"description": "Lambda client library that supports hybrid tracing in node js", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Sorry, the diff of this file is not supported yet
374232
5244