dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.83k stars 773 forks source link

Telemetry exception in VS #16083

Open 0101 opened 9 months ago

0101 commented 9 months ago

Saw this in VS, should be investigated. The reason Go To Definition failed is probably something I did wrong, but if it ever fails for whatever reason looks like we might not get the telemetry.

Repro steps

Use Go To Definition (F12) which for whatever reason fails.

Expected behavior

We send the error to telemetry

Actual behavior

We get exception:

System.ArgumentException: Event name 'gotodefinition/fault' should have at least 3 parts separated by slash.
Parameter name: eventName

     at Microsoft.VisualStudio.Telemetry.DataModelEventNameHelper.ValidateEventName(String eventName)

     at Microsoft.VisualStudio.Telemetry.DataModelEventNameHelper.SetProductFeatureEntityName(String eventName, PrefixedNotConcurrent`1 reservedProperties)

     at Microsoft.VisualStudio.Telemetry.FaultEvent..ctor(String eventName, String description, FaultSeverity faultSeverity, Exception exceptionObject, Func`2 gatherEventDetails)

     at Microsoft.VisualStudio.Telemetry.TelemetrySessionExtensions.PostFault(TelemetrySession telemetrySession, String eventName, String description, FaultSeverity faultSeverity, Exception exceptionObject, Func`2 gatherEventDetails, TelemetryEventCorrelation[] correlatedWith)

     at Microsoft.VisualStudio.Telemetry.TelemetrySessionExtensions.PostFault(TelemetrySession telemetrySession, String eventName, String description, FaultSeverity faultSeverity, Exception exceptionObject)

     at Microsoft.VisualStudio.FSharp.Editor.Telemetry.TelemetryReporter.ReportFault(String name, FSharpOption`1 severity, FSharpOption`1 e) in D:\code\FS\fsharp\vsintegration\src\FSharp.Editor\Telemetry\TelemetryReporter.fs:line 114

     at Microsoft.VisualStudio.FSharp.Editor.FSharpNavigation.TryGoToDefinition(Int32 position, CancellationToken cancellationToken) in D:\code\FS\fsharp\vsintegration\src\FSharp.Editor\Navigation\GoToDefinition.fs:line 743

     at Microsoft.VisualStudio.FSharp.Editor.FSharpGoToDefinitionService.Microsoft.CodeAnalysis.ExternalAccess.FSharp.Editor.IFSharpGoToDefinitionService.TryGoToDefinition(Document document, Int32 position, CancellationToken cancellationToken) in D:\code\FS\fsharp\vsintegration\src\FSharp.Editor\Navigation\GoToDefinitionService.fs:line 33

     at Microsoft.CodeAnalysis.ExternalAccess.FSharp.Internal.Editor.FSharpGoToDefinitionService.TryGoToDefinition(Document document, Int32 position, CancellationToken cancellationToken)

     at Microsoft.CodeAnalysis.GoToDefinition.GoToDefinitionCommandHandler.ExecuteSynchronously(Document document, IGoToDefinitionService service, IAsyncGoToDefinitionService asyncService, Int32 position, CommandExecutionContext context)

     at Microsoft.CodeAnalysis.GoToDefinition.GoToDefinitionCommandHandler.ExecuteCommand(GoToDefinitionCommandArgs args, CommandExecutionContext context)

     at Microsoft.VisualStudio.UI.Text.Commanding.Implementation.EditorCommandHandlerService.<>c__DisplayClass15_1`1.<ExecuteStartingAtIndex>b__0()

     at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call, Predicate`1 exceptionFilter)

Related information

The telemetry code is from a recent main.

vzarytovskii commented 9 months ago

Yeah, I might've made a mistake in some of the reports and didn't concatenate the right thing.

It should've been something like "dotnet/fsharp/gotodefinition/fault" or something similar.