Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
branberry committed Oct 31, 2023
1 parent fffe41b commit 5fc9909
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions cdk-infra/lib/constructs/api/webhook-api-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
AdotLayerVersion,
Code,
Function,
LayerVersion,
Runtime,
Tracing,
} from 'aws-cdk-lib/aws-lambda';
Expand Down Expand Up @@ -73,34 +72,22 @@ export class WebhookApiConstruct extends Construct {
environment,
timeout,
});
const otelCollectorLayer = LayerVersion.fromLayerVersionArn(
this,
'otelCollectorLayer',
'arn:aws:lambda:us-east-2:184161586896:layer:opentelemetry-collector-amd64-0_2_0:1'
);
const otelInstrumentationLayer = LayerVersion.fromLayerVersionArn(
this,
'otelInstrumentationLayer',
'arn:aws:lambda:us-east-2:184161586896:layer:opentelemetry-nodejs-0_2_0:1'
);

const githubTriggerLambda = new NodejsFunction(this, 'githubTriggerLambda', {
entry: `${HANDLERS_PATH}/github.ts`,
runtime,
handler: 'TriggerBuild',
bundling,
environment: {
...environment,
AWS_LAMBDA_EXEC_WRAPPER: '/opt/otel-handler',
// OPENTELEMETRY_COLLECTOR_CONFIG_FILE: '/var/task/config/collector.yaml',
// OTEL_EXPORTER_OTLP_ENDPOINT: 'http://localhost:4318/',
},
environment,
timeout,
tracing: Tracing.ACTIVE,
currentVersionOptions: {
provisionedConcurrentExecutions: 5,
},
layers: [otelInstrumentationLayer, otelCollectorLayer],
adotInstrumentation: {
execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER,
layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.LATEST),
},
});

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

0 comments on commit 5fc9909

Please sign in to comment.