Skip to content

Commit 30263ae

Browse files
Merge pull request #69 from DataDog/darcy.rayner/lowercase-function-arn
Lowercases function arn on dd-trace spans
2 parents 4a34b38 + a247dde commit 30263ae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "datadog-lambda-js",
3-
"version": "2.21.0",
3+
"version": "2.22.0",
44
"description": "Lambda client library that supports hybrid tracing in node js",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/trace/listener.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ export class TraceListener {
8989
const options: TraceOptions = {};
9090
if (this.context) {
9191
logDebug("Applying lambda context to datadog traces");
92+
const functionArn = (this.context.invokedFunctionArn ?? "").toLowerCase();
9293
options.tags = {
9394
cold_start: didFunctionColdStart(),
94-
function_arn: this.context.invokedFunctionArn,
95+
function_arn: functionArn,
9596
request_id: this.context.awsRequestId,
9697
resource_names: this.context.functionName,
9798
};

0 commit comments

Comments
 (0)