fixed connection service tests

This commit is contained in:
Leila Lali
2016-12-08 14:12:34 -08:00
parent 0b295e78c2
commit 7d37431c0d

View File

@@ -358,20 +358,22 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
return false;
}
// Send a telemetry notification for intellisense performance metrics
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
if (ServiceHost != null)
{
Params = new TelemetryProperties
// Send a telemetry notification for intellisense performance metrics
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
{
Properties = new Dictionary<string, string>
Params = new TelemetryProperties
{
Properties = new Dictionary<string, string>
{
{ "IsAzure", info.IsAzure ? "1" : "0" }
},
EventName = TelemetryEventNames.IntellisenseQuantile,
Measures = info.IntellisenseMetrics.Quantile
}
});
EventName = TelemetryEventNames.IntellisenseQuantile,
Measures = info.IntellisenseMetrics.Quantile
}
});
}
// Close the connection
info.SqlConnection.Close();