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: Fix Azure Fns Detector When Running with App Service Detector #1884

Conversation

JacksonWeber
Copy link
Contributor

Which problem is this PR solving?

When running inside of an Azure Function and in the case where both the Azure Functions and Azure App Services detector were being run in the same application, because the Azure App Service check was not exclusive of the Azure Functions check, the application would incorrectly be identified as running inside of Azure App Services.

This PR also adds tests for both Azure Functions and Azure App Services detectors to ensure that they function as expected when running in the same application.

… as app service when they're using functions and both detectors are imported.
@JacksonWeber JacksonWeber requested a review from a team January 3, 2024 05:49
@github-actions github-actions bot requested a review from hectorhdzg January 3, 2024 05:49
@JacksonWeber JacksonWeber changed the title fix(azure-resource-detector): Ensure that resources aren't classified… fix(azure-resource-detector): Fix Azure Fns Detector When Running with App Service Detector Jan 3, 2024
@JacksonWeber JacksonWeber changed the title fix(azure-resource-detector): Fix Azure Fns Detector When Running with App Service Detector fix: Fix Azure Fns Detector When Running with App Service Detector Jan 3, 2024
Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Merging #1884 (5c812a4) into main (2d11b69) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1884   +/-   ##
=======================================
  Coverage   91.45%   91.45%           
=======================================
  Files         144      145    +1     
  Lines        7406     7410    +4     
  Branches     1483     1483           
=======================================
+ Hits         6773     6777    +4     
  Misses        633      633           
Files Coverage Δ
...tor-azure/src/detectors/AzureAppServiceDetector.ts 96.66% <100.00%> (+0.11%) ⬆️

... and 1 file with indirect coverage changes

@JacksonWeber JacksonWeber requested a review from trentm January 3, 2024 20:28
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

@dyladan dyladan merged commit 006c963 into open-telemetry:main Jan 4, 2024
14 checks passed
@dyladan dyladan mentioned this pull request Jan 4, 2024
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.

4 participants