[SVLS-8161] Update Azure Function metadata detection logic
What does this PR do?
If we're in an Azure Function on the flex consumption plan, set aas.resource.group to the DD_AZURE_RESOURCE_GROUP env var.
Motivation
- We are currently adding support for profiling in Azure Functions, but the
aas.resource.grouptag in profiles for Node.js Azure Functions on the Flex Consumption Plan is currently being set toflex- This is because Flex Consumption functions don't have a
WEBSITE_RESOURCE_GROUPenv var, and the structure of theWEBSITE_OWNER_NAMEenv var is different from all other Azure Function hosting plans. As a result, we ask customers to manually set DD_AZURE_RESOURCE_GROUP as an app setting
- This is because Flex Consumption functions don't have a
- Consistent with libdatadog changes made here
- See related ticket here
Additional Notes
TODO: Test across all Node.js Azure products (ACA, AAS) to make sure this doesn't affect their profile tags
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 83.87%. Comparing base (e9493e1) to head (293e799).
:warning: Report is 5 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #7100 +/- ##
==========================================
- Coverage 84.76% 83.87% -0.90%
==========================================
Files 521 521
Lines 22151 22153 +2
==========================================
- Hits 18776 18580 -196
- Misses 3375 3573 +198
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Overall package size
Self size: 4.34 MB Deduped: 5.22 MB No deduping: 5.22 MB
Dependency sizes
| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 1.15.0 | 127.66 kB | 856.24 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe
✅ Tests
🎉 All green!
❄️ No new flaky tests detected
🧪 All tests passed
🔗 Commit SHA: 293e799 | Docs | Datadog PR Page | Was this helpful? Give us feedback!
Benchmarks
Benchmark execution time: 2025-12-16 22:29:43
Comparing candidate commit 293e799a98c3d3143b3710ad908666c9f73158f3 in PR branch kathie.huang/SVLS-8161/update-azure-function-metadata-logic with baseline commit e9493e1923fac4cc2b0325e0b5d413ad00fc7cf3 in branch master.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 290 metrics, 30 unstable metrics.
@codex review
To use Codex here, create a Codex account and connect to github.