From e8892e44298ce7fb46da897344843c038595da37 Mon Sep 17 00:00:00 2001 From: Alexandr Morogov <42555001+krankenbro@users.noreply.github.com> Date: Thu, 21 Mar 2024 08:38:36 +0100 Subject: [PATCH] VCI-784: Add versions of vc-build and os to the telemetry (#128) --- src/VirtoCommerce.Build/Build.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/VirtoCommerce.Build/Build.cs b/src/VirtoCommerce.Build/Build.cs index 22df915..b78c8a3 100644 --- a/src/VirtoCommerce.Build/Build.cs +++ b/src/VirtoCommerce.Build/Build.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Net.Http; using System.Net.Http.Headers; +using System.Reflection; using System.Text; using System.Text.Json; using System.Threading.Tasks; @@ -248,6 +249,8 @@ protected static TelemetryClient TelemetryClient var telemetryConfig = new Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration(); telemetryConfig.ConnectionString = AIConnectionString; _telemetryClient = new TelemetryClient(telemetryConfig); + _telemetryClient.Context.Device.OperatingSystem = Environment.OSVersion.ToString(); + _telemetryClient.Context.Component.Version = Assembly.GetEntryAssembly().GetName().Version.ToString(); } return _telemetryClient; }