mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Configure ApplicationInsights to not send cloud role name (#16246)
Configure ApplicationInsights to not send cloud role name Co-authored-by: Aditya Patwardhan <adityap@microsoft.com>
This commit is contained in:
co-authored by
Aditya Patwardhan
parent
3893c4d55b
commit
d74c6bfb7b
@@ -10,6 +10,7 @@ using System.Threading;
|
||||
|
||||
using Microsoft.ApplicationInsights;
|
||||
using Microsoft.ApplicationInsights.Extensibility;
|
||||
using Microsoft.ApplicationInsights.Extensibility.Implementation;
|
||||
|
||||
namespace Microsoft.PowerShell.Telemetry
|
||||
{
|
||||
@@ -118,6 +119,9 @@ namespace Microsoft.PowerShell.Telemetry
|
||||
configuration.TelemetryChannel.DeveloperMode = false;
|
||||
|
||||
s_telemetryClient = new TelemetryClient(configuration);
|
||||
// Be sure to obscure any information about the client node.
|
||||
s_telemetryClient.Context.Cloud.RoleInstance = string.Empty;
|
||||
s_telemetryClient.Context.GetInternalContext().NodeName = string.Empty;
|
||||
s_sessionId = Guid.NewGuid().ToString();
|
||||
|
||||
// use a hashset when looking for module names, it should be quicker than a string comparison
|
||||
|
||||
Reference in New Issue
Block a user