Skip to content

Commit ccde882

Browse files
authored
chore: Update lambda handler environment variable to match other Agents (#2485)
1 parent 79047db commit ccde882

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Agent/NewRelic/Home/Home.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</Target>
1414

1515
<ItemGroup>
16-
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.21.1.66"/>
16+
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.24.0.10"/>
1717
</ItemGroup>
1818

1919
</Project>

src/Agent/NewRelic/Profiler/Configuration/InstrumentationConfiguration.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ namespace NewRelic { namespace Profiler { namespace Configuration
134134
return;
135135
}
136136

137-
lambdaInstPoint = _systemCalls->TryGetEnvironmentVariable(_X("NEW_RELIC_LAMBDA_FUNCTION_HANDLER"));
137+
lambdaInstPoint = _systemCalls->TryGetEnvironmentVariable(_X("NEW_RELIC_LAMBDA_HANDLER"));
138138
if (lambdaInstPoint != nullptr)
139139
{
140140
AddInstrumentationPointToCollectionFromEnvironment(*lambdaInstPoint);

tests/Agent/IntegrationTests/Applications/LambdaSelfExecutingAssembly/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ private static string GetHandlerMethodName()
156156
}
157157
private static string GetHandlerName()
158158
{
159-
var handlerName = Environment.GetEnvironmentVariable("NEW_RELIC_LAMBDA_FUNCTION_HANDLER") ??
159+
var handlerName = Environment.GetEnvironmentVariable("NEW_RELIC_LAMBDA_HANDLER") ??
160160
Environment.GetEnvironmentVariable("_HANDLER");
161161

162162
if (string.IsNullOrWhiteSpace(handlerName))
163163
{
164-
throw new Exception("The lambda handler is missing. Please ensure that the correct handler is defined in either the NEW_RELIC_LAMBDA_FUNCTION_HANDLER or _HANDLER environment variables.");
164+
throw new Exception("The lambda handler is missing. Please ensure that the correct handler is defined in either the NEW_RELIC_LAMBDA_HANDLER or _HANDLER environment variables.");
165165
}
166166

167167
return handlerName;

tests/Agent/IntegrationTests/IntegrationTests/RemoteServiceFixtures/AwsLambda/LambdaTestToolFixture.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public LambdaTestToolFixture(RemoteApplication remoteApplication, string newReli
3232
SetAdditionalEnvironmentVariable("NEW_RELIC_ACCOUNT_ID", TestConfiguration.NewRelicAccountId);
3333
SetAdditionalEnvironmentVariable("AWS_LAMBDA_RUNTIME_API", $"localhost:{LambdaTestTool.Port}");
3434

35-
AddAdditionalEnvironmentVariableIfNotNull("NEW_RELIC_LAMBDA_FUNCTION_HANDLER", newRelicLambdaHandler);
35+
AddAdditionalEnvironmentVariableIfNotNull("NEW_RELIC_LAMBDA_HANDLER", newRelicLambdaHandler);
3636
AddAdditionalEnvironmentVariableIfNotNull("_HANDLER", lambdaHandler);
3737
AddAdditionalEnvironmentVariableIfNotNull("AWS_LAMBDA_FUNCTION_NAME", lambdaName);
3838
AddAdditionalEnvironmentVariableIfNotNull("AWS_LAMBDA_FUNCTION_VERSION", lambdaVersion);

0 commit comments

Comments
 (0)