Skip to content

Commit

Permalink
[DOP-4033]: Add adot instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Oct 12, 2023
1 parent de81928 commit 7bd449e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cdk-infra/lib/constructs/api/webhook-api-construct.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { Duration } from 'aws-cdk-lib';
import { Cors, CorsOptions, LambdaIntegration, LambdaRestApi } from 'aws-cdk-lib/aws-apigateway';
import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda';
import {
AdotLambdaExecWrapper,
AdotLambdaLayerJavaScriptSdkVersion,
AdotLayerVersion,
Code,
Function,
Runtime,
} from 'aws-cdk-lib/aws-lambda';
import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
import { BundlingOptions, NodejsFunction } from 'aws-cdk-lib/aws-lambda-nodejs';
import { IQueue } from 'aws-cdk-lib/aws-sqs';
Expand Down Expand Up @@ -72,6 +79,10 @@ export class WebhookApiConstruct extends Construct {
bundling,
environment,
timeout,
adotInstrumentation: {
execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER,
layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.V1_7_0),
},
});

const githubDeleteArtifactsLambda = new NodejsFunction(this, 'githubDeleteArtifactsLambda', {
Expand Down

0 comments on commit 7bd449e

Please sign in to comment.