Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.17k stars 4.53k forks source link

[QUERY] How to set UserAccountId in AppInsights with Azure.Monitor.OpenTelemetry.Exporter #44837

Open SteMcLellan opened 3 days ago

SteMcLellan commented 3 days ago

Library name and version

Azure.Monitor.OpenTelemetry.Exporter" Version="1.3.0"

Query/Question

Hello,

I am attempting to convert some applications from using the Application Insights SDK to OpenTelemetry, and am running into some confusion about how to make sure that certain properties on AppRequests are set as expected. We have historically used UserAccountId (or user_AccountId) to store the tenant in our application, and I'd like to continue doing so.

I have been unable to find a "map" between OpenTelemetry fields and those supported by Azure Monitor, does one exist? In absence of map, is there a way to set this field, or will I need to utilize custom dimensions?

Environment

No response

olegd-superoffice commented 2 days ago

This is a "must have" for multi-tenant applications. I also tried to do it but couldn't find a way. I hope that mapping of OTEL attributes to Application Insights Data Model is going to be documented. So far I see that only mapping for cloud role name and cloud role instance is documented and I see that service.version attribute is getting mapped to Application version.

github-actions[bot] commented 2 days ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cijothomas @rajkumar-rangaraj @reyang @TimothyMothra @vishweshbankwar.