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

chore: Update Azure Site Extension to include support for Azure Functions #2976

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

tippmar-nr
Copy link
Member

@tippmar-nr tippmar-nr commented Jan 31, 2025

Update the Azure Websites Site Extension Nuget package to detect when it's being added to an Azure Function.

If the FUNCTIONS_WORKER_RUNTIME environment variable is detected, the extension adds NEW_RELIC_AZURE_FUNCTION_MODE_ENABLED=1 and NEW_RELIC_LOG_DIRECTORY=%HOME%\LogFiles\NewRelic to applicationHost.xdt.

With this change, the customer only needs to add the NEW_RELIC_LICENSE_KEY environment variable manually and the agent will "just work" in an Azure function. The NEW_RELIC_AGENT_VERSION_OVERRIDE environment variable is supported as usual.

@tippmar-nr tippmar-nr requested a review from a team as a code owner January 31, 2025 17:39
chynesNR
chynesNR previously approved these changes Jan 31, 2025
Copy link
Member

@chynesNR chynesNR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.16%. Comparing base (f7987c5) to head (60c47eb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2976   +/-   ##
=======================================
  Coverage   82.16%   82.16%           
=======================================
  Files         473      473           
  Lines       30364    30364           
  Branches     3388     3388           
=======================================
  Hits        24948    24948           
  Misses       4617     4617           
  Partials      799      799           
Flag Coverage Δ
Agent 83.14% <ø> (ø)
Profiler 73.13% <ø> (ø)

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

@tippmar-nr tippmar-nr enabled auto-merge (squash) January 31, 2025 22:03
@tippmar-nr tippmar-nr merged commit c726fba into main Jan 31, 2025
98 checks passed
@tippmar-nr tippmar-nr deleted the chore/aure-site-extension-functions-support branch January 31, 2025 22:31
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.

3 participants