@instana/aws-lambda
Advanced tools
Comparing version 1.92.4 to 1.92.5
{ | ||
"name": "@instana/aws-lambda", | ||
"version": "1.92.4", | ||
"version": "1.92.5", | ||
"description": "Instana tracing and monitoring for Node.js based AWS Lambdas", | ||
@@ -61,4 +61,4 @@ "author": { | ||
"dependencies": { | ||
"@instana/core": "^1.92.4", | ||
"@instana/serverless": "^1.92.4" | ||
"@instana/core": "^1.92.5", | ||
"@instana/serverless": "^1.92.5" | ||
}, | ||
@@ -71,7 +71,7 @@ "devDependencies": { | ||
"express": "^4.16.4", | ||
"mocha": "^6.0.2", | ||
"mocha": "^6.2.2", | ||
"pino": "^5.12.3", | ||
"prettier": "^1.17.1" | ||
}, | ||
"gitHead": "b4d4d9c222e8dcf85d22444366a9d421feecb785" | ||
"gitHead": "50bec8353a5973e8a59ae92e65a74c02d40d730a" | ||
} |
@@ -247,3 +247,2 @@ 'use strict'; | ||
entrySpan.error = entrySpan.ec > 0; | ||
entrySpan.d = Date.now() - entrySpan.ts; | ||
@@ -262,13 +261,9 @@ | ||
backendConnector.sendBundle({ spans, metrics: metricsPayload }, err => { | ||
if (err) { | ||
// We intentionally do not propagate the error from the backend request - the customer's lambda needs to finish | ||
// successfully, no matter if we have been able to report metrics and spans. | ||
logger.warn('Could not send traces and metrics to Instana.', err.message); | ||
logger.debug('Could not send traces and metrics to Instana.', err); | ||
} else { | ||
logger.info('Traces and metrics have been sent to Instana.'); | ||
} | ||
callback(); | ||
}); | ||
// Sending data from an AWS Lambda is always a fire and forget operation. We do not wait for the response from the | ||
// Instana back end. This reduces the delay we add to the runtime of a Lambda handler significantly. The drawback we | ||
// need to accept for that reduced runtime penalty is that we cannot know if the data has reached the Instana back | ||
// end or not. Thus, the callback we pass to sendBundle is never called with an error. | ||
// Also, we would not want to propagate an error from the backend request anyway - the customer's lambda handler needs | ||
// to finish successfully, no matter if we have been able to report metrics and spans. | ||
backendConnector.sendBundle({ spans, metrics: metricsPayload }, callback); | ||
} | ||
@@ -286,4 +281,5 @@ | ||
instanaCore.logger.init(config); | ||
backendConnector.setLogger(logger); | ||
}; | ||
exports.opentracing = tracing.opentracing; |
32897
730
Updated@instana/core@^1.92.5
Updated@instana/serverless@^1.92.5