libdatadog icon indicating copy to clipboard operation
libdatadog copied to clipboard

Mini Agent: Extract azure env vars + add tags

Open thedavl opened this issue 2 years ago • 1 comments

What does this PR do?

Adds logic into the mini agent to process azure env vars, and add the following tags:

  • azurefunction.resource.id
  • azurefunction.resource.group
  • azurefunction.subscription.id
  • azurefunction.site.name
  • azurefunction.environment.os

The azurefunction.resource.id is constructed in the following format: /subscriptions/<subscription-id>/resourcegroups/<resource-group>/providers/microsoft.web/sites/<site-name>

image

Motivation

Azure trace tracking

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

For Reviewers

  • [ ] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • [ ] This PR doesn't touch any of that.

thedavl avatar Sep 22 '23 19:09 thedavl

Just a question: could it be reused ? https://github.com/DataDog/libdatadog/blob/8cbc9dbf7b6f32dc5f6a43c62e89421f4c8217d2/ddcommon/src/azure_app_services.rs#L7

gleocadie avatar Oct 31 '23 09:10 gleocadie

Handled in https://github.com/DataDog/libdatadog/pull/463

duncanpharvey avatar Jun 26 '24 00:06 duncanpharvey