-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use distinct EventSource names for compiler and workspace layer events #75613
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to need to ask the RPS folks to turn this collector on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.