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.47k stars 4.8k forks source link

[FEATURE REQ] Use structured logging #42457

Open mderriey opened 8 months ago

mderriey commented 8 months ago

Library name

Microsoft.Azure.WebJobs.Extensions.Storage.Common

Please describe the feature.

We have an Azure Functions app with target-based scaling and a queue trigger.

We noticed that all target scalers (Queues, Service Bus, and Event Hub) don't use structured logging, and there's the extra space between "QueueLength" and the equal sign.

https://github.com/Azure/azure-sdk-for-net/blob/80c332520a63dad418d6e49ddd139858483b852b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueTargetScaler.cs#L67

Would it be OK to move to structured logging? We'd like to use these logs as the base for an Azure Monitor alert, and getting the dynamic values from the App Insights trace custom properties would be much cleaner than extracting them from the rendered message.

I'd be happy to open a PR for this.

github-actions[bot] commented 8 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.