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

feat: Improve serverless mode detection #2661

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

tippmar-nr
Copy link
Member

@tippmar-nr tippmar-nr commented Aug 1, 2024

Modifies the Profiler to look for the NEW_RELIC_LAMBDA_HANDLER environment variable before looking for _HANDLER.

If NEW_RELIC_LAMBDA_HANDLER isn't found or can't be parsed successfully, the profiler then looks for _HANDLER and applies the same parsing test. If neither variable exists or can be parsed correctly, serverless mode is not enabled.

Resolves #2659

tippmar-nr and others added 2 commits August 1, 2024 11:27
chore: Update Profiler NuGet Package Reference to v10.27.0.15.

Co-authored-by: tippmar-nr <120425148+tippmar-nr@users.noreply.github.com>
@tippmar-nr tippmar-nr requested a review from a team as a code owner August 1, 2024 18:03
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.81%. Comparing base (7608af3) to head (323d011).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2661      +/-   ##
==========================================
+ Coverage   80.77%   80.81%   +0.04%     
==========================================
  Files         459      459              
  Lines       29064    29065       +1     
  Branches     3191     3191              
==========================================
+ Hits        23475    23489      +14     
+ Misses       4797     4787      -10     
+ Partials      792      789       -3     
Flag Coverage Δ
Agent 81.72% <ø> (+0.04%) ⬆️
Profiler 72.60% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...filer/Configuration/InstrumentationConfiguration.h 93.15% <100.00%> (+0.03%) ⬆️

... and 3 files with indirect coverage changes

@tippmar-nr tippmar-nr changed the title fix: Improve serverless mode detection feat: Improve serverless mode detection Aug 1, 2024
@tippmar-nr tippmar-nr merged commit 5f5dda8 into main Aug 1, 2024
93 checks passed
@tippmar-nr tippmar-nr deleted the fix/serverless-detection-update branch August 1, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer NEW_RELIC_LAMBDA_HANDLER over _HANDLER when detecting serverless mode
3 participants