Skip to content

Commit

Permalink
feat: Add support for .NET agent lambdas using the layer. (#440)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Hemsath <[email protected]>
Co-authored-by: Alex Hemsath <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent b6ae3ae commit 7bd2621
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const wrappableRuntimeList = [
"java11",
"java17",
"java21",
"dotnet6",
"dotnet7",
"dotnet8",
];

export default class NewRelicLambdaLayerPlugin {
Expand Down Expand Up @@ -538,6 +541,15 @@ or make sure that you already have Serverless 3.x installed in your project.
environment.NEW_RELIC_SERVERLESS_MODE_ENABLED = "true";
}

// Uses same layer as CLI so the paths will be the same
if (runtime.match("dotnet")) {
environment.CORECLR_ENABLE_PROFILING = "1";
environment.CORECLR_PROFILER = "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}";
environment.CORECLR_NEWRELIC_HOME = "/opt/lib/newrelic-dotnet-agent";
environment.CORECLR_PROFILER_PATH =
"/opt/lib/newrelic-dotnet-agent/libNewRelicProfiler.so";
}

const extensionDisabled =
!_.isUndefined(this.config.enableExtension) &&
(this.config.enableExtension === "false" ||
Expand Down

0 comments on commit 7bd2621

Please sign in to comment.