mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Catch exceptions raised sending telemetry events (#182)
This commit is contained in:
@@ -360,19 +360,26 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
|
||||
if (ServiceHost != null)
|
||||
{
|
||||
// Send a telemetry notification for intellisense performance metrics
|
||||
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
|
||||
try
|
||||
{
|
||||
Params = new TelemetryProperties
|
||||
// Send a telemetry notification for intellisense performance metrics
|
||||
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
|
||||
{
|
||||
Properties = new Dictionary<string, string>
|
||||
{
|
||||
{ "IsAzure", info.IsAzure ? "1" : "0" }
|
||||
},
|
||||
EventName = TelemetryEventNames.IntellisenseQuantile,
|
||||
Measures = info.IntellisenseMetrics.Quantile
|
||||
}
|
||||
});
|
||||
Params = new TelemetryProperties
|
||||
{
|
||||
Properties = new Dictionary<string, string>
|
||||
{
|
||||
{ "IsAzure", info.IsAzure ? "1" : "0" }
|
||||
},
|
||||
EventName = TelemetryEventNames.IntellisenseQuantile,
|
||||
Measures = info.IntellisenseMetrics.Quantile
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Write(LogLevel.Verbose, "Could not send Connection telemetry event " + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
// Close the connection
|
||||
|
||||
Reference in New Issue
Block a user