Skip to content

Commit 74ad69c

Browse files
author
Hao Chen
committed
Enable OS detection.
1 parent 1d15258 commit 74ad69c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Common/Commands.Common/MetricHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private void LoadTelemetryClientContext(AzurePSQoSEvent qos, TelemetryContext cl
148148
clientContext.User.Id = qos.Uid;
149149
clientContext.User.AccountId = qos.Uid;
150150
clientContext.Session.Id = qos.SessionId;
151-
clientContext.Device.OperatingSystem = "Windows";
151+
clientContext.Device.OperatingSystem = Environment.OSVersion.ToString();
152152
}
153153

154154
private void PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary<string, string> eventProperties)
@@ -157,7 +157,7 @@ private void PopulatePropertiesFromQos(AzurePSQoSEvent qos, IDictionary<string,
157157
eventProperties.Add("ModuleName", qos.ModuleName);
158158
eventProperties.Add("ModuleVersion", qos.ModuleVersion);
159159
eventProperties.Add("HostVersion", qos.HostVersion);
160-
eventProperties.Add("OS", "Windows");
160+
eventProperties.Add("OS", Environment.OSVersion.ToString());
161161
eventProperties.Add("CommandParameters", qos.Parameters);
162162
eventProperties.Add("UserId", qos.Uid);
163163
eventProperties.Add("x-ms-client-request-id", qos.ClientRequestId);

0 commit comments

Comments
 (0)