[SVLS-9121] Identify Azure Container Apps OTel Payloads and emit Datadog exporter running metric - #51116
[SVLS-9121] Identify Azure Container Apps OTel Payloads and emit Datadog exporter running metric#51116kathiehuang wants to merge 25 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Files inventory check summaryFile checks results against ancestor 6332ce3d: Results for datadog-agent_7.83.0~devel.git.379.dfa6738.pipeline.126651196-1_amd64.deb:No change detected |
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 6332ce3 Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | quality_gate_metrics_logs | memory utilization | +1.06 | [+0.81, +1.31] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_logs | % cpu utilization | +0.28 | [-0.71, +1.28] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle | memory utilization | +0.25 | [+0.20, +0.30] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_mean_fs_load | memory utilization | +0.21 | [+0.18, +0.25] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle_all_features | memory utilization | +0.21 | [+0.17, +0.25] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_no_fs_load | memory utilization | -0.05 | [-0.15, +0.04] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_idle | memory utilization | -0.12 | [-0.17, -0.06] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_private_action_runner | memory utilization | -0.43 | [-0.55, -0.30] | 1 | Logs bounds checks dashboard |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gate_idle | intake_connections | 10/10 | 3 ≤ 4 | bounds checks dashboard |
| ✅ | quality_gate_idle | memory_usage | 10/10 | 149.40MiB ≤ 154MiB | bounds checks dashboard |
| ✅ | quality_gate_idle | total_bytes_received | 10/10 | 736.35KiB ≤ 819.20KiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | 3 ≤ 4 | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | memory_usage | 10/10 | 500.12MiB ≤ 512MiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | total_bytes_received | 10/10 | 1.13MiB ≤ 1.25MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | intake_connections | 10/10 | 4 ≤ 6 | bounds checks dashboard |
| ✅ | quality_gate_logs | memory_usage | 10/10 | 187.26MiB ≤ 195MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
| ✅ | quality_gate_logs | total_bytes_received | 10/10 | 264.15MiB ≤ 292MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | cpu_usage | 10/10 | 360.29 ≤ 2000 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | intake_connections | 10/10 | 3 ≤ 6 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | memory_usage | 10/10 | 392.49MiB ≤ 430MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | total_bytes_received | 10/10 | 0.93GiB ≤ 1.04GiB | bounds checks dashboard |
| ✅ | quality_gate_private_action_runner | memory_usage | 10/10 | 71.12MiB ≤ 75MiB | bounds checks dashboard |
| ✅ | quality_gate_security_idle | cpu_usage | 10/10 | 30.88 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_idle | memory_usage | 10/10 | 301.13MiB ≤ 330MiB | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | cpu_usage | 10/10 | 65.93 ≤ 200 | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | memory_usage | 10/10 | 278.88MiB ≤ 310MiB | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | cpu_usage | 10/10 | 21.93 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | memory_usage | 10/10 | 284.11MiB ≤ 320MiB | 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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
Replicate Execution Details
We run multiple replicates for each experiment/variant. However, we allow replicates to be automatically retried if there are any failures, up to 8 times, at which point the replicate is marked dead and we are unable to run analysis for the entire experiment. We call each of these attempts at running replicates a replicate execution. This section lists all replicate executions that failed due to the target crashing or being oom killed.
Note: In the below tables we bucket failures by experiment, variant, and failure type. For each of these buckets we list out the replicate indexes that failed with an annotation signifying how many times said replicate failed with the given failure mode. In the below example the baseline variant of the experiment named experiment_with_failures had two replicates that failed by oom kills. Replicate 0, which failed 8 executions, and replicate 1 which failed 6 executions, all with the same failure mode.
| Experiment | Variant | Replicates | Failure | Logs | Debug Dashboard |
|---|---|---|---|---|---|
| experiment_with_failures | baseline | 0 (x8) 1 (x6) | Oom killed | Debug Dashboard |
The debug dashboard links will take you to a debugging dashboard specifically designed to investigate replicate execution failures.
❌ Retried Profiling Replicate Execution Failures (ddprof)
Note: Profiling replicas may still be executing. See the debug dashboard for up to date status.
| Experiment | Variant | Replicates | Failure | Debug Dashboard |
|---|---|---|---|---|
| quality_gate_idle_all_features | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_idle_all_features | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_logs | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_logs | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_metrics_logs | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_metrics_logs | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_security_idle | baseline | 10 | Crashed (exit code: 134) | Debug Dashboard |
| quality_gate_security_idle | comparison | 10 | Oom killed | Debug Dashboard |
| quality_gate_security_mean_fs_load | baseline | 10 | Crashed (exit code: 134) | Debug Dashboard |
| quality_gate_security_no_fs_load | baseline | 10 | Oom killed | Debug Dashboard |
| quality_gate_security_no_fs_load | comparison | 10 | Crashed (exit code: 134) | Debug Dashboard |
CI Pass/Fail Decision
✅ Passed. All Quality Gates passed.
- quality_gate_idle_all_features, 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 total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check memory_usage: 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 missed_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check missed_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 total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_private_action_runner, bounds check memory_usage: 10/10 replicas passed. Gate passed.
Static quality checks✅ Please find below the results from static quality gates Successful checksInfo
|
|
This pull request has been automatically marked as stale because it has not had activity in the past 15 days. It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window. Thank you for your contributions! |
|
This pull request has been automatically marked as stale because it has not had activity in the past 15 days. It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window. Thank you for your contributions! |
50cd9d4 to
180d6c8
Compare
Go Package Import DifferencesBaseline: 6332ce3
|
|
@codex review |
a814af6 to
f018c2e
Compare
There was a problem hiding this comment.
Pull request overview
Adds first-class detection for Azure Container Apps as an OTLP “source” and uses that source identity to emit a workload-specific exporter running metric (otel.datadog_exporter.metrics.running.azurecontainerapps{...}), while refactoring source identity handling to support multi-dimension identifiers.
Changes:
- Introduces
AzureContainerAppsKindsource detection (includingcloud.resource_idfallback parsing) and refactorsSource.Identifierfromstringto a structured{Primary, Dimensions}. - Adds
TagSetConsumerand expands running-metric emission to support multi-tag workload identities (Fargate + Azure Container Apps). - Updates trace/log/metrics pipelines and unit tests to use
Identifier.Primary, plus Bazel deps for additional semconv versions.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/trace/transform/transform.go | Adjust hostname extraction to use Identifier.Primary. |
| pkg/trace/api/otlp.go | Updates OTLP trace receiver hostname/source handling for new identifier type. |
| pkg/trace/api/otlp_test.go | Fixes assertions to validate Identifier.Primary. |
| pkg/opentelemetry-mapping-go/otlp/metrics/minimal_translator.go | Adds TagSetConsumer support and ACA tag building for running metric attribution. |
| pkg/opentelemetry-mapping-go/otlp/metrics/metrics_translator.go | Updates host handling and expands running-metric attribution for Fargate/ACA via TagSetConsumer. |
| pkg/opentelemetry-mapping-go/otlp/metrics/metrics_translator_test.go | Updates test provider to return structured identifiers. |
| pkg/opentelemetry-mapping-go/otlp/metrics/consumer.go | Introduces TagSetConsumer interface and documents running-metric attribution. |
| pkg/opentelemetry-mapping-go/otlp/logs/translator.go | Updates log hostname extraction to use Identifier.Primary. |
| pkg/opentelemetry-mapping-go/otlp/logs/transform.go | Updates host extraction helpers to use Identifier.Primary. |
| pkg/opentelemetry-mapping-go/otlp/attributes/source/source_provider.go | Adds AzureContainerAppsKind, introduces Identifier struct, updates Tag() behavior. |
| pkg/opentelemetry-mapping-go/otlp/attributes/source.go | Implements ACA detection + dimension extraction and prevents falling back to Azure hostname logic. |
| pkg/opentelemetry-mapping-go/otlp/attributes/source_test.go | Adds ACA unit tests and updates existing source tests for structured identifiers. |
| pkg/opentelemetry-mapping-go/otlp/attributes/BUILD.bazel | Adds Bazel dependency for semconv/v1.40.0. |
| pkg/opentelemetry-mapping-go/otlp/attributes/azure/azure.go | Clarifies resource-group attribute key differences for Azure semconv variants. |
| pkg/opentelemetry-mapping-go/otlp/attributes/attributes.go | Adds ACA tag mappings + Azure ARM resource ID parsing helper + updates GetHost logic. |
| pkg/opentelemetry-mapping-go/inframetadata/reporter.go | Updates infra metadata hostname extraction to use Identifier.Primary. |
| comp/otelcol/otlp/components/exporter/serializerexporter/serializer.go | Updates serializer hostname provider to use Identifier.Primary. |
| comp/otelcol/otlp/components/exporter/serializerexporter/factory.go | Switches OSS consumer dedup tracking from single tags to tag sets. |
| comp/otelcol/otlp/components/exporter/serializerexporter/exporter.go | Updates source provider to return structured identifier. |
| comp/otelcol/otlp/components/exporter/serializerexporter/exporter_test.go | Updates tests for new tag-set dedup tracking and identifier handling. |
| comp/otelcol/otlp/components/exporter/serializerexporter/consumer_collector.go | Implements tag-set dedup + workload-specific running metrics (including ACA). |
| comp/otelcol/otlp/components/exporter/serializerexporter/consumer_collector_test.go | Adds/updates tests for workload running metrics + ACA tag-set dedup. |
| comp/otelcol/otlp/components/exporter/datadogexporter/traces_exporter.go | Updates trace exporter source keying to use Identifier.Primary. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…r apps from trace path
…from resource attributes
…ce into its own function
…er to string, and fix call sites
e3ca03d to
dfa6738
Compare
|
This pull request has been automatically marked as stale because it has not had activity in the past 15 days. It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window. Thank you for your contributions! |
What does this PR do?
Adds
AzureContainerAppsKindas a recognized OTel source type and emitsotel.datadog_exporter.metrics.running.azurecontainerapps{replica, subscription_id, resource_group, name}when the Azure resource attributesazure.container_app.instance.id,azure.resource_group.name,cloud.account.id,service.instance.nameare populated in a metric payload.cloud.platformisazure.container_apps(semconv >= v1.35.0), return AzureContainerAppsKind with the replica name as the identifier (service.instance.id)azure_container_appswas added in v1.25.0 and then changed toazure.container_appsin v1.35.0.source.gocurrently usessemconv v1.6.1so we usev1.43.0to get the updated convention.azure.resource_group.namewas added in v1.43.0 as well, so semconv versions are updated correspondingly.Source.Identifierfrom string to aSource.SourceIdentifier{Primary, Dimensions}structhost,task_arn), but Azure Container Apps are identified by replica name, subscription id, resource group, and service name, so theDimensionsfield allows identification by multiple attributesTagSetConsumeroptional interface (ConsumeTagSet(metricSuffix string, tags []string)) to generalize workload-specific running-metric emission across all workloads. Deprecates the previousTagsConsumerthat only allowed for one tag/workload on the running metricTagSetConsumer(previously its own single-tagTagsConsumer/ConsumeTagmechanism) so both workload types (and future workloads) share one dedup/emission mechanism inconsumer_collector.gocloud.resource_idis parsed as a fallback source forsubscription_id/resource_group/namewhen the primary semconv attributes aren't presentMotivation
https://datadoghq.atlassian.net/browse/SVLS-9121
Describe how you validated your changes
Unit tests
Built Go binary in corresponding collector-contrib PR and deployed an Azure Container App emitting a metric using an OTel collector with the Datadog exporter and a bicep file with


OTEL_RESOURCE_ATTRIBUTES='cloud.account.id=${subscription().subscriptionId},azure.resource_group.name=${resourceGroup().name}'using serverless-azure-gcp-otel-sample-apps repo with the Azure Container Apps resource detector from the Go SDK. Saw the metricotel.datadog_exporter.metrics.running.azurecontainerappswith the expected tags!Three Step Migration Needed
opentelemetry-collector-contrib needs a PR to use
source.Source.SourceIdentifierandmetrics.TagSetConsumeronce this is merged and to add Azure Container Apps to its legacy consumer path.Draft PR: open-telemetry/opentelemetry-collector-contrib#49615
It seems like there's a circular pin dependency as collector-contrib depends on the
Identifierstruct change in this PR.As a result we are doing a 3-step migration from
source.Source.Identifiertosource.Source.SourceIdentifier:source.Source.SourceIdentifieras an additive field and use it where needed while still supportingsource.Source.Identifiercall sites. Marksource.Source.Identifieras deprecated. This will be in this PR.source.Source.Identifiercall sites tosource.Source.SourceIdentifiersource.Source.SourceIdentifier, remove the deprecatedsource.Source.IdentifierAdditional Notes
Note: The Azure Container Apps resourcedetectionprocessor detector was recently added to opentelemetry-collector-contrib https://datadoghq.atlassian.net/browse/SVLS-8996
Note: A PR to add
azure.container_app.instance.idto semantic conventions is in progressazure.container_app.instance.idalready but does not emitazure.resource_group.name- customers still have to set resource group andcloud.account.id=<subscription_id>manually viaOTEL_RESOURCE_ATTRIBUTESbecause this information is not available in environment variables for Azure Container Apps