//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Generic;
using Microsoft.SqlTools.Hosting.Contracts;
namespace Microsoft.SqlTools.CoreServices.LanguageServices.Contracts
{
public class TelemetryProperties
{
public string EventName { get; set; }
///
/// Telemetry properties
///
public Dictionary Properties { get; set; }
///
/// Telemetry measures
///
public Dictionary Measures { get; set; }
}
///
/// Parameters sent back with an IntelliSense ready event
///
public class TelemetryParams
{
public TelemetryProperties Params { get; set; }
}
///
/// Event sent when the language service needs to add a telemetry event
///
public class TelemetryNotification
{
public static readonly
EventType Type =
EventType.Create("telemetry/sqlevent");
}
///
/// List of telemetry events
///
public static class TelemetryEventNames
{
///
/// telemetry event name for auto complete response time
///
public const string IntellisenseQuantile = "IntellisenseQuantile";
///
/// telemetry event name for when definition is requested
///
public const string PeekDefinitionRequested = "PeekDefinitionRequested";
///
/// telemetry event name for when definition is requested
///
public const string FormatCode = "FormatCode";
}
///
/// List of properties used in telemetry events
///
public static class TelemetryPropertyNames
{
///
/// Is a connection to an Azure database or not
///
public const string IsAzure = "IsAzure";
///
/// Did an event succeed or not
///
public const string Succeeded = "Succeeded";
///
/// Was the action against a connected file or similar resource, or not
///
public const string Connected = "Connected";
///
/// Format type property - should be one of or
///
public const string FormatType = "FormatType";
///
/// A full document format
///
public const string DocumentFormatType = "Document";
///
/// A document range format
///
public const string RangeFormatType = "Range";
}
}