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

[FEATURE REQ] Open Telemetry Sample Request #44587

Open rapatank opened 3 weeks ago

rapatank commented 3 weeks ago

Information

https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=net#connection-string to provide example to support logging all columns in traces table. Currently, it allows only severityLevel, message, EventName and customdimensions.

rapatank commented 3 weeks ago

Would it be possible to share an example of how to log operation_Name and some of the other fields present in the traces table in AppInsights? The example sdk seems to use Microsoft.Extensions.Logging that only supports a few fields like message and customDimensions. Would it be possible to enable logging other fields in the traces table such as operation_Name and overwrite _ResourceId (which currently is pre-populated)?

github-actions[bot] commented 2 weeks ago

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

cijothomas commented 2 weeks ago

operation_Name and overwrite _ResourceId (which currently is pre-populated)?

These are special fields. There won't be ability to populate them with custom values using ILogger API.

Can you elaborate your end goals, so we can suggest alternates?