Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Insights does not recognize resource detected by Azure Container Apps detector as Azure resource #2112

Open
hansmbakker opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working comp:resources.azure Things related to OpenTelemetry.Resources.Azure

Comments

@hansmbakker
Copy link
Contributor

hansmbakker commented Sep 27, 2024

Component

OpenTelemetry.Resources.Azure

Package Version

Package Name Version
OpenTelemetry 1.9.0

Runtime Version

net8.0

Description

I’m using Aspire.NET which has support for OpenTelemetry export to Application Insights. It uses the AzureContainerAppsResourceDetector which enables some Container App properties to be correctly ingested in Application Insights – like its Application Map.

However, when inspecting a node’s Compute details, it says

We didn't detect any Azure resources connected to backend. If you know that this should be connected to an Azure resource, your current Application Insights SDK/Agent may not support this detection.”

I read Migrate from Application Insights .NET SDKs to Azure Monitor OpenTelemetry - Azure Monitor | Microsoft Learn and Application map in Azure Application Insights - Azure Monitor | Microsoft Learn but those pages do not give me any pointers.

image

Steps to Reproduce

Create a basic Aspire.NET app.
Run it in Container Apps
Send the opentelemetry to Application Insights

Expected Result

The container app is recognized as an Azure resource in the Application Insights Application Map. It is possible to see the compute details when selecting the node.

Actual Result

The container app is detected but only marked with its app name. Azure Application insights does not recognize what Azure resource it belongs to. The Compute blade on the Application Map is empty for the given node.

Additional Context

This is also sent to OTel@microsoft.com.

The detector sets

  • service.name to the name of the Container App
  • service.version to the revision of the Container App
  • service.instance.id to the replica name of the Container App

but this might not be enough. Maybe Application Insights is expecting a full resource id (incl. subscription id and resource group name) in one of these properties or another property? The documentation at Understand cloud role names and nodes does not clearly state that this would be required, though.

@hansmbakker hansmbakker added the bug Something isn't working label Sep 27, 2024
@github-actions github-actions bot added the comp:resources.azure Things related to OpenTelemetry.Resources.Azure label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp:resources.azure Things related to OpenTelemetry.Resources.Azure
Projects
None yet
Development

No branches or pull requests

1 participant