Skip to content

Commit 8b922aa

Browse files
committed
chore: enable profiler everywhere
1 parent 344ce93 commit 8b922aa

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

user-management/infra/aws/lib/background-workers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export class BackgroundWorkers extends Construct {
7171
DD_LOGS_INJECTION: "true",
7272
DD_RUNTIME_METRICS_ENABLED: "true",
7373
DD_PROFILING_ENABLED: "true",
74+
LD_PRELOAD: "/opt/datadog/linux-x64/Datadog.Linux.ApiWrapper.x64.so",
7475
POWERTOOLS_SERVICE_NAME: props.sharedProps.serviceName,
7576
POWERTOOLS_LOG_LEVEL:
7677
props.sharedProps.environment === "prod" ? "WARN" : "INFO",

user-management/infra/aws/lib/constructs/instrumented-function.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,23 @@ export class InstrumentedLambdaFunction extends Construct {
5757
functionName: `${props.sharedProps.serviceName}-${props.functionName}-${props.sharedProps.environment}`,
5858
projectDir: props.buildDef,
5959
handler: props.handler,
60-
architecture: Architecture.ARM_64,
60+
architecture: Architecture.X86_64,
6161
memorySize: props.memorySize ?? 512,
6262
timeout: props.timeout ?? Duration.seconds(29),
6363
onFailure: props.onFailure,
6464
vpc: props.vpc,
6565
vpcSubnets: props.vpcSubnets,
6666
securityGroups: props.securityGroups,
6767
bundling: {
68-
dockerImage: DockerImage.fromRegistry("public.ecr.aws/sam/build-dotnet10"),
68+
dockerImage: DockerImage.fromRegistry(
69+
"public.ecr.aws/sam/build-dotnet10",
70+
),
6971
},
7072
environment: {
7173
AWS_LAMBDA_EXEC_WRAPPER: "/opt/datadog_wrapper",
7274
POWERTOOLS_SERVICE_NAME: props.sharedProps.serviceName,
7375
POWERTOOLS_LOG_LEVEL:
74-
props.logLevel ?? props.sharedProps.environment === "prod"
76+
(props.logLevel ?? props.sharedProps.environment === "prod")
7577
? "WARN"
7678
: "INFO",
7779
ENV: props.sharedProps.environment,
@@ -101,12 +103,12 @@ export class InstrumentedLambdaFunction extends Construct {
101103
LayerVersion.fromLayerVersionArn(
102104
this,
103105
"DatadogLayer",
104-
`arn:aws:lambda:${region}:464622532012:layer:Datadog-Extension-ARM:80`
106+
`arn:aws:lambda:${region}:464622532012:layer:Datadog-Extension:92`,
105107
),
106108
LayerVersion.fromLayerVersionArn(
107109
this,
108110
"DDTraceLayer",
109-
`arn:aws:lambda:${region}:464622532012:layer:dd-trace-dotnet-ARM:20`
111+
`arn:aws:lambda:${region}:464622532012:layer:dd-trace-dotnet:23`,
110112
),
111113
],
112114
});

0 commit comments

Comments
 (0)