Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless mode does not correctly handle a missing license key #2499

Closed
nrcventura opened this issue May 22, 2024 · 1 comment · Fixed by #2500
Closed

Serverless mode does not correctly handle a missing license key #2499

nrcventura opened this issue May 22, 2024 · 1 comment · Fixed by #2500
Labels
bug Something isn't working

Comments

@nrcventura
Copy link
Member

Description

When the agent is operating in serverless mode, it should not require a license key to be configured. The lambda extension that is responsible for transmitting the serverless data has 2 options for specifying the license key.

  1. Using an AWS secrect to manage the license key
  2. Using the license key environment variable

If both options are used the extension will log a warning that you should not configure both. If only the AWS secret is used, the .net agent won't start correctly and reports the following error.

There was an error initializing the agent
System.Exception: Please set your license key.
   at NewRelic.Agent.Core.AgentManager.AssertAgentEnabled()
   at NewRelic.Agent.Core.AgentManager..ctor()
   at NewRelic.Agent.Core.AgentManager.AgentSingleton.CreateInstance()

The current workaround is to specify the license key as an environment variable.

Expected Behavior

The .net agent should start successfully in serverless mode if the license key is not provided.

Steps to Reproduce

  1. Configure a .net lambda to use the .net agent and lambda extension
  2. Use an AWS secret to specify the license key
  3. Enable logging for the lambda extension and the .net agent
  4. Send an event to the lambda
  5. Verify that the .net agent does not start correctly because of the missing license key

For Maintainers Only or Hero Triaging this bug
Suggested Priority (P1,P2,P3,P4,P5): P5
Suggested T-Shirt size (S, M, L, XL, Unknown): S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant