diff --git a/src/Bicep.LangServer.IntegrationTests/TelemetryTests.cs b/src/Bicep.LangServer.IntegrationTests/TelemetryTests.cs index fd5963f8497..7320b7f392f 100644 --- a/src/Bicep.LangServer.IntegrationTests/TelemetryTests.cs +++ b/src/Bicep.LangServer.IntegrationTests/TelemetryTests.cs @@ -40,7 +40,7 @@ public async Task ValidateDeclarationSnippetCompletionItemContainsCommandWithTel TelemetryEvent? telemetryEvent = command?.Arguments?.First().ToObject(); command?.Name.Should().Be(TelemetryConstants.CommandName); - telemetryEvent?.EventName.Should().Be(TelemetryConstants.EventNames.DeclarationSnippetCompletion); + telemetryEvent?.EventName.Should().Be(TelemetryConstants.EventNames.TopLevelDeclarationSnippetInsertion); telemetryEvent?.Properties?.ContainsKey("label"); } } diff --git a/src/Bicep.LangServer/Completions/BicepCompletionProvider.cs b/src/Bicep.LangServer/Completions/BicepCompletionProvider.cs index 711ee146d54..a2017636522 100644 --- a/src/Bicep.LangServer/Completions/BicepCompletionProvider.cs +++ b/src/Bicep.LangServer/Completions/BicepCompletionProvider.cs @@ -89,7 +89,7 @@ private IEnumerable GetDeclarationCompletions(BicepCompletionCon { { "label", resourceSnippet.Prefix } }; - TelemetryEvent telemetryEvent = new(TelemetryConstants.EventNames.DeclarationSnippetCompletion, properties); + TelemetryEvent telemetryEvent = new(TelemetryConstants.EventNames.TopLevelDeclarationSnippetInsertion, properties); Command command = Command.Create(TelemetryConstants.CommandName, telemetryEvent); yield return CreateContextualSnippetCompletion(resourceSnippet.Prefix, diff --git a/src/Bicep.LangServer/Handlers/BicepTelemetryHandler.cs b/src/Bicep.LangServer/Handlers/BicepTelemetryHandler.cs index 87a7b4e730b..45344f430cd 100644 --- a/src/Bicep.LangServer/Handlers/BicepTelemetryHandler.cs +++ b/src/Bicep.LangServer/Handlers/BicepTelemetryHandler.cs @@ -25,7 +25,7 @@ public BicepTelemetryHandler(ITelemetryProvider telemetryProvider) private static ExecuteCommandRegistrationOptions GetExecuteCommandRegistrationOptions() => new ExecuteCommandRegistrationOptions() { - Commands = new Container("bicep.telemetry") + Commands = new Container(TelemetryConstants.CommandName) }; public override Task Handle(ExecuteCommandParams request, CancellationToken cancellationToken) diff --git a/src/Bicep.LangServer/Telemetry/TelemetryConstants.cs b/src/Bicep.LangServer/Telemetry/TelemetryConstants.cs index bc8dec8dcfd..a1600013fa5 100644 --- a/src/Bicep.LangServer/Telemetry/TelemetryConstants.cs +++ b/src/Bicep.LangServer/Telemetry/TelemetryConstants.cs @@ -5,12 +5,11 @@ namespace Bicep.LanguageServer.Telemetry { public class TelemetryConstants { - public const string Prefix = "bicep/"; public const string CommandName = "bicep.Telemetry"; public class EventNames { - public const string DeclarationSnippetCompletion = Prefix + nameof(DeclarationSnippetCompletion); + public const string TopLevelDeclarationSnippetInsertion = nameof(TopLevelDeclarationSnippetInsertion); } } } diff --git a/src/vscode-bicep/.vscode/launch.json b/src/vscode-bicep/.vscode/launch.json index fcccc0246ab..b0a31f07f31 100644 --- a/src/vscode-bicep/.vscode/launch.json +++ b/src/vscode-bicep/.vscode/launch.json @@ -17,8 +17,7 @@ "outFiles": ["${workspaceRoot}/out/src/**/*.js"], "preLaunchTask": "${defaultBuildTask}", "env": { - "BICEP_LANGUAGE_SERVER_PATH": "${workspaceRoot}/../Bicep.LangServer/bin/Debug/net5.0/Bicep.LangServer.dll", - "DEBUGTELEMETRY": "verbose" + "BICEP_LANGUAGE_SERVER_PATH": "${workspaceRoot}/../Bicep.LangServer/bin/Debug/net5.0/Bicep.LangServer.dll" } }, {