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

fix(azure-functions-resource-detector): Update Azure Functions Detector to Consider WEBSITE_SKU #2251

Conversation

JacksonWeber
Copy link
Contributor

Which problem is this PR solving?

  • It is possible for the Azure Functions detector to not detect the Azure Functions environment correctly in certain edge cases.

Short description of the changes

  • There are some edge cases in which the FUNCTIONS_EXTENSION_VERSION may be undefined, in which case we should also check the WEBSITE_SKU for the value FlexConsumption to determine if we still may be running in an Azure Function.

Copy link

codecov bot commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.39%. Comparing base (dfb2dff) to head (6c91aff).
Report is 154 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2251      +/-   ##
==========================================
- Coverage   90.97%   90.39%   -0.59%     
==========================================
  Files         146      149       +3     
  Lines        7492     7525      +33     
  Branches     1502     1578      +76     
==========================================
- Hits         6816     6802      -14     
- Misses        676      723      +47     
Files Coverage Δ
...tor-azure/src/detectors/AzureAppServiceDetector.ts 100.00% <100.00%> (+3.33%) ⬆️
...ctor-azure/src/detectors/AzureFunctionsDetector.ts 100.00% <100.00%> (ø)
...opentelemetry-resource-detector-azure/src/types.ts 100.00% <100.00%> (ø)
...opentelemetry-resource-detector-azure/src/utils.ts 100.00% <100.00%> (ø)

... and 53 files with indirect coverage changes

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

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

I added a few nits :)

@JacksonWeber JacksonWeber changed the title fix: Update Azure Functions Detector to Consider WEBSITE_SKU fix(azure-functions-resource-detector) Update Azure Functions Detector to Consider WEBSITE_SKU Jun 4, 2024
@JacksonWeber JacksonWeber changed the title fix(azure-functions-resource-detector) Update Azure Functions Detector to Consider WEBSITE_SKU fix(azure-functions-resource-detector): Update Azure Functions Detector to Consider WEBSITE_SKU Jun 4, 2024
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

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

LGTM

@pichlermarc pichlermarc merged commit 93776fa into open-telemetry:main Jun 10, 2024
13 checks passed
@dyladan dyladan mentioned this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants