Use distinct EventSource names for compiler and workspace layer events#75613
Use distinct EventSource names for compiler and workspace layer events#75613RikkiGibson merged 1 commit intodotnet:mainfrom
Conversation
| [EventSource(Name = "Microsoft-CodeAnalysis-General")] | ||
| internal sealed partial class CodeAnalysisEventSource | ||
| { | ||
| public static readonly CodeAnalysisEventSource Log = new CodeAnalysisEventSource(); |
There was a problem hiding this comment.
The goal of putting this member here is to make it so you can't log events at all if you forget to declare a partial which specifies the event source name.
|
|
||
| namespace Microsoft.CodeAnalysis | ||
| { | ||
| [EventSource(Name = "Microsoft-CodeAnalysis-Workspaces")] |
There was a problem hiding this comment.
Are we going to need to ask the RPS folks to turn this collector on?
There was a problem hiding this comment.
I am expecting the following PR to enable this collector: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/587560
|
Pretty sure that we have documentation on how to collect traces for the compiler / IDE. Should we add both of the event source names into that document to make it easier for customers to give us traces? |
Besides in the original attribute, I only found the provider name mentioned in Since Replay is only handling a compilation scenario, it feels reasonable to leave that doc as is. |
Related VS regression bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2289777
We think this issue may be causing CodeAnalysis events to fail to appear in IDE traces.
VS PR to enable new event source in RPS/Speedometer: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/587560
Alternatively, we could expose the CodeAnalysisEventSource as a public experimental API.