mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -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)
|
if (ServiceHost != null)
|
||||||
{
|
{
|
||||||
// Send a telemetry notification for intellisense performance metrics
|
try
|
||||||
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
|
|
||||||
{
|
{
|
||||||
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
|
||||||
{
|
{
|
||||||
{ "IsAzure", info.IsAzure ? "1" : "0" }
|
Properties = new Dictionary<string, string>
|
||||||
},
|
{
|
||||||
EventName = TelemetryEventNames.IntellisenseQuantile,
|
{ "IsAzure", info.IsAzure ? "1" : "0" }
|
||||||
Measures = info.IntellisenseMetrics.Quantile
|
},
|
||||||
}
|
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
|
// Close the connection
|
||||||
|
|||||||
Reference in New Issue
Block a user