Enabling DacFx telemetry (#1993)

* Enabling DacFx telemetry
This commit is contained in:
Leila Lali
2023-04-11 14:22:05 -07:00
committed by GitHub
parent 9aa84f517c
commit a37093a773
7 changed files with 116 additions and 9 deletions

View File

@@ -17,6 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
private ISqlToolsSettingsValues sqlTools = null;
private SqlToolsSettingsValues mssqlTools = null;
private SqlToolsSettingsValues allSqlTools = null;
private TelemetrySettingsValues telemetrySettings = null;
public ISqlToolsSettingsValues SqlTools
{
@@ -65,6 +66,23 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
}
}
/// <summary>
/// Gets or sets the underlying settings value object
/// </summary>
[JsonProperty("telemetry")]
public TelemetrySettingsValues TelemetrySettings
{
get
{
this.telemetrySettings ??= new TelemetrySettingsValues();
return this.telemetrySettings;
}
set
{
this.telemetrySettings = value;
}
}
/// <summary>
/// Query execution settings forwarding property
/// </summary>

View File

@@ -0,0 +1,15 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.SqlContext
{
public enum TelemetryLevel
{
All,
Error,
Crash,
Off
}
}

View File

@@ -0,0 +1,18 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Newtonsoft.Json;
namespace Microsoft.SqlTools.ServiceLayer.SqlContext
{
public class TelemetrySettingsValues
{
/// <summary>
/// Gets or sets the telemetry level setting
/// </summary>
[JsonProperty("telemetryLevel")]
public TelemetryLevel Telemetry { get; set; }
}
}