Skip to content

Commit

Permalink
VCI-784: Add versions of vc-build and os to the telemetry (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
krankenbro authored Mar 21, 2024
1 parent a1ffbf5 commit e8892e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/VirtoCommerce.Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e8892e4

Please sign in to comment.