microsoft / ApplicationInsights-dotnet-server

Microsoft Application Insights for .NET Web Applications
https://azure.microsoft.com/services/application-insights/
133 stars 67 forks source link

How to set the value of Context.User.Id in PerformanceCollector #1270

Closed FisherMS closed 5 years ago

FisherMS commented 5 years ago

Expected Behavior

I want set a value for Azure's AI Log(Analytics) performanceCounters.user_Id. How the write the code to implement this goal.

image

Version Info

SDK Version : Microsoft.AI.PerfCounterCollector 2.10.0.0 .NET Version : 4.5
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : OS : Win10 + Console

cijothomas commented 5 years ago

Have you tried using telemetryinitializer to add user info? https://docs.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#add-properties-itelemetryinitializer

FisherMS commented 5 years ago

Thank you ,Thank you very much. It's helpful.