Skip to content

[SVLS-8160] Add serverless-identifying profile tags to serverless-init#44361

Merged
dd-mergequeue[bot] merged 3 commits into
mainfrom
kathie.huang/SVLS-8160/add-serverless-tags-to-azure-profiles
Dec 22, 2025
Merged

[SVLS-8160] Add serverless-identifying profile tags to serverless-init#44361
dd-mergequeue[bot] merged 3 commits into
mainfrom
kathie.huang/SVLS-8160/add-serverless-tags-to-azure-profiles

Conversation

@kathiehuang

@kathiehuang kathiehuang commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds the _dd.origin tag to profiles for Azure App Service Linux and Azure Container Apps
    • containerapp for Azure Container Apps
    • appservice for Azure App Service
    • cloudrun for Cloud Run Functions and Cloud Run Service
    • cloudrunjobs for Cloud Run Jobs

Motivation

  • This will help the profiling backend filter out and track serverless profiles for billing purposes.

Describe how you validated your changes

Deployed with DD_PROFILING_ENABLED=true and looked at network request to validate that _dd.origin is set correctly (following this local testing guide for serverless-init)

  • Test in-process mode for Azure Container Apps
  • Test sidecar mode for Azure Container Apps
  • Test in-process mode for Azure Linux Web Apps
  • Test sidecar mode for Azure Linux Web Apps
image

Additional Notes

@github-actions github-actions Bot added the short review PR is simple enough to be reviewed quickly label Dec 17, 2025
@agent-platform-auto-pr

agent-platform-auto-pr Bot commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor b665fd4
📊 Static Quality Gates Dashboard

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 $${0}$$ $${707.15}$$ < $${707.24}$$ $${-0.03}$$ $${173.47}$$ < $${174.02}$$
agent_deb_amd64_fips $${0}$$ $${702.45}$$ < $${702.86}$$ $${-0.04}$$ $${172.37}$$ < $${173.5}$$
agent_heroku_amd64 $${0}$$ $${328.77}$$ < $${329.53}$$ $${-0}$$ $${87.44}$$ < $${88.43}$$
agent_msi $${0}$$ $${570.84}$$ < $${982.08}$$ $${-0.01}$$ $${142.73}$$ < $${143.02}$$
agent_rpm_amd64 $${0}$$ $${707.13}$$ < $${707.23}$$ $${-0.04}$$ $${175.98}$$ < $${177.24}$$
agent_rpm_amd64_fips $${0}$$ $${702.44}$$ < $${702.85}$$ $${+0.01}$$ $${175.58}$$ < $${176.32}$$
agent_rpm_arm64 $${0}$$ $${688.91}$$ < $${692.59}$$ $${+0.01}$$ $${159.58}$$ < $${160.9}$$
agent_rpm_arm64_fips $${0}$$ $${685.04}$$ < $${687.54}$$ $${+0.02}$$ $${159.0}$$ < $${160.11}$$
agent_suse_amd64 $${0}$$ $${707.13}$$ < $${707.23}$$ $${-0.04}$$ $${175.98}$$ < $${177.24}$$
agent_suse_amd64_fips $${0}$$ $${702.44}$$ < $${702.85}$$ $${+0.01}$$ $${175.58}$$ < $${176.32}$$
agent_suse_arm64 $${0}$$ $${688.91}$$ < $${692.59}$$ $${+0.01}$$ $${159.58}$$ < $${160.9}$$
agent_suse_arm64_fips $${0}$$ $${685.04}$$ < $${687.54}$$ $${+0.02}$$ $${159.0}$$ < $${160.11}$$
docker_agent_amd64 $${+0}$$ $${768.94}$$ < $${769.58}$$ $${+0}$$ $${261.22}$$ < $${261.89}$$
docker_agent_arm64 $${+0}$$ $${775.28}$$ < $${779.27}$$ $${+0}$$ $${250.27}$$ < $${252.08}$$
docker_agent_jmx_amd64 $${-0}$$ $${959.82}$$ < $${960.46}$$ $${-0}$$ $${329.85}$$ < $${330.53}$$
docker_agent_jmx_arm64 $${-0}$$ $${954.88}$$ < $${958.87}$$ $${+0}$$ $${314.89}$$ < $${316.71}$$
docker_cluster_agent_amd64 $${+0}$$ $${180.73}$$ < $${181.08}$$ $${+0}$$ $${63.85}$$ < $${64.49}$$
docker_cluster_agent_arm64 $${+0}$$ $${196.56}$$ < $${198.49}$$ $${+0}$$ $${60.12}$$ < $${61.17}$$
docker_cws_instrumentation_amd64 $${0}$$ $${7.13}$$ < $${7.18}$$ $${-0}$$ $${2.99}$$ < $${3.33}$$
docker_cws_instrumentation_arm64 $${0}$$ $${6.69}$$ < $${6.92}$$ $${+0}$$ $${2.73}$$ < $${3.09}$$
docker_dogstatsd_amd64 $${+0}$$ $${38.8}$$ < $${39.38}$$ $${+0}$$ $${15.02}$$ < $${15.82}$$
docker_dogstatsd_arm64 $${-0}$$ $${37.13}$$ < $${37.94}$$ $${-0}$$ $${14.34}$$ < $${14.83}$$
dogstatsd_deb_amd64 $${0}$$ $${30.02}$$ < $${30.61}$$ $${-0}$$ $${7.94}$$ < $${8.79}$$
dogstatsd_deb_arm64 $${0}$$ $${28.18}$$ < $${29.11}$$ $${-0}$$ $${6.82}$$ < $${7.71}$$
dogstatsd_rpm_amd64 $${0}$$ $${30.02}$$ < $${30.61}$$ $${+0}$$ $${7.95}$$ < $${8.8}$$
dogstatsd_suse_amd64 $${0}$$ $${30.02}$$ < $${30.61}$$ $${+0}$$ $${7.95}$$ < $${8.8}$$
iot_agent_deb_amd64 $${0}$$ $${42.97}$$ < $${43.29}$$ $${+0}$$ $${11.25}$$ < $${12.04}$$
iot_agent_deb_arm64 $${0}$$ $${40.09}$$ < $${40.92}$$ $${+0}$$ $${9.62}$$ < $${10.45}$$
iot_agent_deb_armhf $${0}$$ $${40.67}$$ < $${41.03}$$ $${+0}$$ $${9.81}$$ < $${10.62}$$
iot_agent_rpm_amd64 $${0}$$ $${42.97}$$ < $${43.29}$$ $${-0}$$ $${11.26}$$ < $${12.06}$$
iot_agent_suse_amd64 $${0}$$ $${42.97}$$ < $${43.29}$$ $${-0}$$ $${11.26}$$ < $${12.06}$$

@cit-pr-commenter

cit-pr-commenter Bot commented Dec 17, 2025

Copy link
Copy Markdown

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 01225fa0-877e-4182-9746-25b009617cc4

Baseline: b665fd4
Comparison: 7841b5d
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization -0.34 [-3.33, +2.64] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
ddot_metrics memory utilization +1.39 [+1.18, +1.60] 1 Logs
quality_gate_logs % cpu utilization +0.99 [-0.47, +2.45] 1 Logs bounds checks dashboard
quality_gate_idle memory utilization +0.46 [+0.41, +0.50] 1 Logs bounds checks dashboard
ddot_metrics_sum_delta memory utilization +0.42 [+0.22, +0.63] 1 Logs
ddot_logs memory utilization +0.39 [+0.33, +0.46] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization +0.36 [+0.13, +0.59] 1 Logs
ddot_metrics_sum_cumulative memory utilization +0.30 [+0.14, +0.46] 1 Logs
otlp_ingest_metrics memory utilization +0.21 [+0.05, +0.36] 1 Logs
file_tree memory utilization +0.08 [+0.04, +0.11] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.02 [-0.10, +0.14] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.01 [-0.03, +0.06] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput +0.01 [-0.07, +0.09] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.00 [-0.42, +0.42] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.01 [-0.43, +0.41] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput -0.01 [-0.14, +0.12] 1 Logs
otlp_ingest_logs memory utilization -0.03 [-0.13, +0.08] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.09 [-0.46, +0.28] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.09 [-0.15, -0.03] 1 Logs
quality_gate_idle_all_features memory utilization -0.30 [-0.34, -0.25] 1 Logs bounds checks dashboard
docker_containers_memory memory utilization -0.34 [-0.41, -0.26] 1 Logs
docker_containers_cpu % cpu utilization -0.34 [-3.33, +2.64] 1 Logs
quality_gate_metrics_logs memory utilization -1.29 [-1.50, -1.08] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput -2.40 [-2.47, -2.32] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency lost_bytes 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_logs memory_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs cpu_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 bounds checks dashboard
quality_gate_metrics_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_metrics_logs memory_usage 10/10 bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@kathiehuang
kathiehuang force-pushed the kathie.huang/SVLS-8160/add-serverless-tags-to-azure-profiles branch from ce9e8c1 to 1c74132 Compare December 17, 2025 19:54
@kathiehuang
kathiehuang force-pushed the kathie.huang/SVLS-8160/add-serverless-tags-to-azure-profiles branch from 1c74132 to b4cc0ff Compare December 18, 2025 18:49
@kathiehuang kathiehuang added the qa/done QA done before merge and regressions are covered by tests label Dec 19, 2025
@kathiehuang
kathiehuang marked this pull request as ready for review December 19, 2025 15:34
@kathiehuang
kathiehuang requested a review from a team as a code owner December 19, 2025 15:34
@kathiehuang kathiehuang changed the title [SVLS-8160] Add serverless-identifying tags to Azure App Service profiles [SVLS-8160] Add serverless-identifying tags to Azure App Service & Azure Container App profiles Dec 19, 2025
@kathiehuang kathiehuang changed the title [SVLS-8160] Add serverless-identifying tags to Azure App Service & Azure Container App profiles [SVLS-8160] Add serverless-identifying tags to Azure App Service and Azure Container App profiles Dec 19, 2025
"aas.subscription.id",
"aas.resource.group",
"aas.resource.id",
"_dd.origin",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

where does this origin actually get set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It gets set in their respective cloudservice files: appservice.go for Azure App Service and containerapp.go for Azure Container Apps! And then GetTags gets called in main.go here

@github-actions github-actions Bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Dec 19, 2025
@kathiehuang

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Dec 22, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-12-22 15:18:13 UTC ℹ️ Start processing command /merge


2025-12-22 15:18:19 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-12-22 15:18:57 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

@kathiehuang

Copy link
Copy Markdown
Contributor Author

/merge -c

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Dec 22, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-12-22 15:18:53 UTC ℹ️ Start processing command /merge -c

@kathiehuang

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Dec 22, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-12-22 15:52:36 UTC ℹ️ Start processing command /merge


2025-12-22 15:52:43 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-12-22 16:34:09 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 2h (p90).


2025-12-22 17:51:44 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue
dd-mergequeue Bot merged commit 8c7d0a9 into main Dec 22, 2025
329 checks passed
@dd-mergequeue
dd-mergequeue Bot deleted the kathie.huang/SVLS-8160/add-serverless-tags-to-azure-profiles branch December 22, 2025 17:51
@github-actions github-actions Bot added this to the 7.75.0 milestone Dec 22, 2025
dd-mergequeue Bot pushed a commit that referenced this pull request Jan 16, 2026
…ws profiles (#44488)

### What does this PR do?
- Adds `_dd.origin:appservice` tag to profiles for Azure App Service Windows Apps
  - The tag gets passed via `apm_config.additional_profile_tags`, which is set in [this PR](DataDog/datadog-aas-extension#419) in the AAS Site Extension
- Refactors how extra tags get added to profiles
  - Turns AzureServerlessTags into a map called `AdditionalProfileTags` for clearer future use

### Motivation
- This will help the profiling backend filter out and track serverless profiles for billing purposes.

[See related PR](#44361)

### Describe how you validated your changes
Deployed Node.js and .NET Azure App Service Windows Apps with the Site Extension with `DD_PROFILING_ENABLED=true` and looked at network request to validate that `_dd.origin` is set correctly
1. Downloaded `datadog-trace-agent.exe` and `dogstatsd.exe` from the `package_build > windows_zip_agent_binaries_x64-a7` job
2. Stopped an existing AAS Windows app using the site extension
3. In Kudu, replaced `datadog-trace-agent.exe` and `dogstatsd.exe` with the dev version
4. Copied and pasted the changes in `datadog.yaml` from the related [AAS Extension PR](DataDog/datadog-aas-extension#419) over
5. Started the app
6. Saw `_dd.origin` in the profile tags!
<img width="204" height="127" alt="image" src="https://github.com/user-attachments/assets/6a08a29c-be18-4604-9d6f-af7b43c87fa7" />

- Also tested with an Azure Container App to make sure the refactoring didn't affect anything there

Co-authored-by: kathie.huang <[email protected]>
theomagellan pushed a commit that referenced this pull request Jan 19, 2026
…ws profiles (#44488)

### What does this PR do?
- Adds `_dd.origin:appservice` tag to profiles for Azure App Service Windows Apps
  - The tag gets passed via `apm_config.additional_profile_tags`, which is set in [this PR](DataDog/datadog-aas-extension#419) in the AAS Site Extension
- Refactors how extra tags get added to profiles
  - Turns AzureServerlessTags into a map called `AdditionalProfileTags` for clearer future use

### Motivation
- This will help the profiling backend filter out and track serverless profiles for billing purposes.

[See related PR](#44361)

### Describe how you validated your changes
Deployed Node.js and .NET Azure App Service Windows Apps with the Site Extension with `DD_PROFILING_ENABLED=true` and looked at network request to validate that `_dd.origin` is set correctly
1. Downloaded `datadog-trace-agent.exe` and `dogstatsd.exe` from the `package_build > windows_zip_agent_binaries_x64-a7` job
2. Stopped an existing AAS Windows app using the site extension
3. In Kudu, replaced `datadog-trace-agent.exe` and `dogstatsd.exe` with the dev version
4. Copied and pasted the changes in `datadog.yaml` from the related [AAS Extension PR](DataDog/datadog-aas-extension#419) over
5. Started the app
6. Saw `_dd.origin` in the profile tags!
<img width="204" height="127" alt="image" src="https://github.com/user-attachments/assets/6a08a29c-be18-4604-9d6f-af7b43c87fa7" />

- Also tested with an Azure Container App to make sure the refactoring didn't affect anything there

Co-authored-by: kathie.huang <[email protected]>
@kathiehuang kathiehuang changed the title [SVLS-8160] Add serverless-identifying tags to Azure App Service and Azure Container App profiles [SVLS-8160] Add serverless-identifying profile tags to serverless-init Jan 21, 2026
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Jan 23, 2026
…ws profiles (#45281)

**Note:** This is a reimplementation of [this PR](#44488), which was reverted [here](#45200). This fixes the failing CI test.

Working CI tests: [Job 1](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1370634331), [Job 2](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1370634332)

### What does this PR do?
- Adds `_dd.origin:appservice` tag to profiles for Azure App Service Windows Apps
  - The tag gets passed via `apm_config.additional_profile_tags`, which is set in [this PR](DataDog/datadog-aas-extension#419) in the AAS Site Extension
- Refactors how extra tags get added to profiles
  - Turns AzureServerlessTags into a map called `AdditionalProfileTags` for clearer future use

The only changes between this PR and the reverted PR is commit [ef27a8a](ef27a8a), which fixes the CI test ([failed job #1](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1356878378), [failed job #2](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1356827817)), and dcc9ad9, which renames `azureServerlessTags` to be cloud-agnostic as `_dd.origin` gets set for profiles in Google Cloud Run Services, Jobs, and Functions, not just Azure products.

### Motivation
- This will help the profiling backend filter out and track serverless profiles for billing purposes.

[See related PR](#44361)

### Describe how you validated your changes
Deployed Node.js and .NET Azure App Service Windows Apps with the Site Extension with `DD_PROFILING_ENABLED=true` and looked at network request to validate that `_dd.origin` is set correctly
1. Downloaded `datadog-trace-agent.exe` and `dogstatsd.exe` from the `package_build > windows_zip_agent_binaries_x64-a7` job
2. Stopped an existing AAS Windows app using the site extension
3. In Kudu, replaced `datadog-trace-agent.exe` and `dogstatsd.exe` with the dev version
4. Copied and pasted the changes in `datadog.yaml` from the related [AAS Extension PR](DataDog/datadog-aas-extension#419) over
5. Started the app
6. Saw `_dd.origin` in the profile tags!
<img width="204" height="127" alt="image" src="https://github.com/user-attachments/assets/6a08a29c-be18-4604-9d6f-af7b43c87fa7" />

- Also tested with an Azure Container App to make sure the refactoring didn't affect anything there, and tested in GCP environments to verify the `_dd.origin` tag gets set in profiles

Co-authored-by: kathie.huang <[email protected]>
theomagellan pushed a commit that referenced this pull request Feb 2, 2026
…ws profiles (#45281)

**Note:** This is a reimplementation of [this PR](#44488), which was reverted [here](#45200). This fixes the failing CI test.

Working CI tests: [Job 1](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1370634331), [Job 2](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1370634332)

### What does this PR do?
- Adds `_dd.origin:appservice` tag to profiles for Azure App Service Windows Apps
  - The tag gets passed via `apm_config.additional_profile_tags`, which is set in [this PR](DataDog/datadog-aas-extension#419) in the AAS Site Extension
- Refactors how extra tags get added to profiles
  - Turns AzureServerlessTags into a map called `AdditionalProfileTags` for clearer future use

The only changes between this PR and the reverted PR is commit [ef27a8a](ef27a8a), which fixes the CI test ([failed job #1](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1356878378), [failed job #2](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1356827817)), and dcc9ad9, which renames `azureServerlessTags` to be cloud-agnostic as `_dd.origin` gets set for profiles in Google Cloud Run Services, Jobs, and Functions, not just Azure products.

### Motivation
- This will help the profiling backend filter out and track serverless profiles for billing purposes.

[See related PR](#44361)

### Describe how you validated your changes
Deployed Node.js and .NET Azure App Service Windows Apps with the Site Extension with `DD_PROFILING_ENABLED=true` and looked at network request to validate that `_dd.origin` is set correctly
1. Downloaded `datadog-trace-agent.exe` and `dogstatsd.exe` from the `package_build > windows_zip_agent_binaries_x64-a7` job
2. Stopped an existing AAS Windows app using the site extension
3. In Kudu, replaced `datadog-trace-agent.exe` and `dogstatsd.exe` with the dev version
4. Copied and pasted the changes in `datadog.yaml` from the related [AAS Extension PR](DataDog/datadog-aas-extension#419) over
5. Started the app
6. Saw `_dd.origin` in the profile tags!
<img width="204" height="127" alt="image" src="https://github.com/user-attachments/assets/6a08a29c-be18-4604-9d6f-af7b43c87fa7" />

- Also tested with an Azure Container App to make sure the refactoring didn't affect anything there, and tested in GCP environments to verify the `_dd.origin` tag gets set in profiles

Co-authored-by: kathie.huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/serverless-azure-gcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants