-
Notifications
You must be signed in to change notification settings - Fork 4.2k
On the fly docs - add telemetry regarding documentation comments #74088
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
Conversation
| throw new InvalidOperationException("QuickInfoSession is null"); | ||
| } | ||
|
|
||
| OnTheFlyDocsLogger.LogShowedOnTheFlyDocsLink(); |
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.
Could we log whether a symbol has doc-comment here? That would tell us how often a symbol user hover over has no doc, right?
| /// <param name="language">the language of the symbol</param> | ||
| internal sealed class OnTheFlyDocsElement(string symbolSignature, ImmutableArray<string> declarationCode, string language) | ||
| /// <param name="hasComments">whether the symbol has comments</param> | ||
| internal sealed class OnTheFlyDocsElement(string symbolSignature, ImmutableArray<string> declarationCode, string language, bool hasComments) |
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.
Maybe also differentiate source symbols and metadata symbols?
| Logger.Log(FunctionId.CodeAnalysisService_CalculateDiagnosticsAsync, KeyValueLogMessage.Create(m => | ||
| { | ||
| m["SymbolHeaderText"] = _onTheFlyDocsElement.SymbolSignature; | ||
| }, LogLevel.Information)); |
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.
what's this log message for?
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.
Oh I meant to change that
| return new OnTheFlyDocsElement(symbol.ToDisplayString(), symbolStrings, symbol.Language); | ||
| return new OnTheFlyDocsElement(symbol.ToDisplayString(), symbolStrings, symbol.Language, hasDocumentationComment); | ||
|
|
||
| bool HasDocumentationComment(ImmutableArray<SyntaxReference> references) |
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.
when creating a tooltip in QuickInfoUtilities.CreateQuickInfoItemAsync, it looks like we know whether if contains doc-comment, is it possible log there instead so we don't have to check the syntax?
| return null; | ||
| } | ||
|
|
||
| if (symbol.MetadataToken != 0) |
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.
so this does what we want? Great!
* upstream/main: [main] Update dependencies from dotnet/arcade (dotnet#74099) Remove warning for `yield return` in `lock` (dotnet#74024) [release/dev17.10] Update dependencies from dotnet/arcade (dotnet#74113) On the fly docs - add telemetry regarding documentation comments (dotnet#74088) Query for the COM service provider instead of direct cast Add type hints for collection expressions (dotnet#74051) Align implementation with latest LDM decisions around invocations in presence of dynamic arguments. (dotnet#74097) Avoid allocations in AbstractSyntaxIndex<>.GetIndexAsync
Adds some telemetry to see if documentation comments impact the number of users clicking "tell me more" link.