Skip to content

[Feature]: Container Apps: default parity with @azure/monitor-opentelemetry (resource detection, SDK stats metadata lookup) #277

Open

Description

@dtorres-fgf

Component

azure-monitor

Problem Statement

We run a Node.js app on Azure Container Apps with @azure/monitor-opentelemetry 1.20.1 and tried moving to @microsoft/opentelemetry 1.5.0, as the Azure Monitor docs now recommend. With default settings, two things differ on Container Apps:

  1. The platform isn't detected: no cloud.platform or Container Apps attributes. @azure/monitor-opentelemetry includes azureContainerAppsDetector since 1.20.0.
  2. The exporter's SDK-stats metadata lookup (GET http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01) is exported as a failed dependency plus an ECONNREFUSED exception on each start (Container Apps has no IMDS). The same exporter version (1.0.0-beta.46) under @azure/monitor-opentelemetry 1.20.1 doesn't export it.

Evidence (our app's container image, Node.js 26.13, ESM with import-in-the-middle's synchronous hook; Container Apps conditions as measured on our live app: the six CONTAINER_APP_* variables set, IMDS refusing connections)

Distro Settings cloud.platform Failed IMDS dependency + exception per start
@azure/monitor-opentelemetry 1.20.1 defaults azure.container_apps none
@microsoft/opentelemetry 1.5.0 defaults not set 1 + 1
same APPLICATIONINSIGHTS_STATSBEAT_DISABLED or …_STATSBEAT_DISABLED_ALL not set 1 + 1
same APPLICATIONINSIGHTS_SDKSTATS_DISABLED=true not set none
same resource: detectResources({ detectors: [azureContainerAppsDetector] }) azure.container_apps n/a

Proposed Solution

Could the distro include azureContainerAppsDetector by default, and keep the SDK-stats metadata lookup out of exported telemetry on Container Apps, matching @azure/monitor-opentelemetry?

Alternatives Considered

The last two rows above work as workarounds. Neither blocks us, but we'd rather not turn SDK stats off or carry our own detector wiring, so for now we're staying on @azure/monitor-opentelemetry.

Additional Context

Versions: @microsoft/opentelemetry 1.5.0, @azure/monitor-opentelemetry 1.20.1, @azure/monitor-opentelemetry-exporter 1.0.0-beta.46, @opentelemetry/resource-detector-azure 0.29.0, Node.js 26.13.0.

Thanks. We're happy to test a change against our setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions