643 references to FunctionId
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
336Logger.Log(FunctionId.CommandHandler_CompleteStatement, KeyValueLogMessage.Create(LogType.UserAction, static (m, args) =>
EventHookup\EventHookupCommandHandler_TypeCharCommand.cs (1)
35using (Logger.LogBlock(FunctionId.EventHookup_Type_Char, cancellationToken))
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
137using (Logger.LogBlock(FunctionId.EventHookup_Determine_If_Event_Hookup, cancellationToken))
Microsoft.CodeAnalysis.CSharp.Features (9)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
81using (Logger.LogBlock(FunctionId.Completion_SnippetCompletionProvider_GetItemsWorker_CSharp, cancellationToken))
Copilot\CSharpCopilotCodeFixProvider.DismissChangesCodeAction.cs (2)
40Logger.Log(FunctionId.Copilot_Suggestion_Dismissed, KeyValueLogMessage.Create(static (m, args) => 58Logger.Log(FunctionId.Copilot_Suggestion_Dismissed);
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (3)
75Logger.Log(FunctionId.Copilot_Implement_NotImplementedException_Fix_Registered, logLevel: LogLevel.Information); 130Logger.Log(FunctionId.Copilot_Implement_NotImplementedException_Completed, logLevel: LogLevel.Information); 135Logger.Log(FunctionId.Copilot_Implement_NotImplementedException_Failed, errorMessage, logLevel: LogLevel.Error);
NavigationBar\CSharpNavigationBarItemService.cs (2)
65using (Logger.LogBlock(FunctionId.NavigationBar_ItemService_GetMembersInTypes_CSharp, cancellationToken)) 138using (Logger.LogBlock(FunctionId.NavigationBar_ItemService_GetTypesInFile_CSharp, cancellationToken))
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
263Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Content_Excluded, logLevel: LogLevel.Information);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Simplification\CSharpSimplificationService.cs (2)
54using (Logger.LogBlock(FunctionId.Simplifier_ExpandNode, cancellationToken)) 81using (Logger.LogBlock(FunctionId.Simplifier_ExpandToken, cancellationToken))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
43using (Logger.LogBlock(FunctionId.Refactoring_RemoveUnnecessaryImports_CSharp, cancellationToken))
Microsoft.CodeAnalysis.EditorFeatures (90)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
148using var blockLogger = Logger.LogBlock(FunctionId.CommandHandler_Paste_ImportsOnPaste, KeyValueLogMessage.Create(LogType.UserAction), cancellationToken);
Adornments\AbstractAdornmentManager.cs (2)
106using (Logger.LogBlock(FunctionId.Tagger_AdornmentManager_OnLayoutChanged, CancellationToken.None)) 202using (Logger.LogBlock(FunctionId.Tagger_AdornmentManager_UpdateInvalidSpans, CancellationToken.None))
BraceMatching\BraceHighlightingViewTaggerProvider.cs (1)
64using (Logger.LogBlock(FunctionId.Tagger_BraceHighlighting_TagProducer_ProduceTags, cancellationToken))
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (1)
227using (Logger.LogBlock(FunctionId.Tagger_SemanticClassification_TagProducer_ProduceTags, cancellationToken))
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
284using (Logger.LogBlock(FunctionId.Tagger_SyntacticClassification_TagComputer_GetTags, CancellationToken.None))
CommentSelection\AbstractToggleBlockCommentBase.cs (1)
73using (Logger.LogBlock(FunctionId.CommandHandler_ToggleBlockComment, KeyValueLogMessage.Create(LogType.UserAction, m =>
CommentSelection\ToggleLineCommentCommandHandler.cs (1)
61using (Logger.LogBlock(FunctionId.CommandHandler_ToggleLineComment, KeyValueLogMessage.Create(LogType.UserAction, static (m, args) =>
DocumentationComments\DocumentationCommentSuggestion.cs (5)
41Logger.Log(FunctionId.Copilot_Generate_Documentation_Accepted, logLevel: LogLevel.Information); 54Logger.Log(FunctionId.Copilot_Generate_Documentation_Dismissed, logLevel: LogLevel.Information); 61Logger.Log(FunctionId.Copilot_Generate_Documentation_Diverged, logLevel: LogLevel.Information); 127Logger.Log(FunctionId.Copilot_Generate_Documentation_Displayed, logLevel: LogLevel.Information); 131Logger.Log(FunctionId.Copilot_Generate_Documentation_Canceled, logLevel: LogLevel.Information);
Editor\EditorLayerExtensionManager.cs (2)
22using static Microsoft.CodeAnalysis.Internal.Log.FunctionId; 109private static void LogAction(FunctionId functionId, object provider)
ErrorReporting\EditorErrorReportingService.cs (2)
25=> Logger.Log(FunctionId.Extension_Exception, exception.StackTrace); 28=> Logger.Log(FunctionId.Extension_Exception, message);
ExternalAccess\IntelliCode\IntentProcessor.cs (1)
48Logger.Log(FunctionId.Intellicode_UnknownIntent, KeyValueLogMessage.Create(LogType.UserAction, static (m, args) =>
Formatting\FormatCommandHandler.cs (2)
59using (Logger.LogBlock(FunctionId.CommandHandler_FormatCommand, KeyValueLogMessage.Create( 89using (Logger.LogBlock(FunctionId.Formatting_ApplyResultToBuffer, cancellationToken))
GoOrFind\AbstractGoOrFindNavigationService.cs (1)
71protected abstract FunctionId FunctionId { get; }
GoOrFind\FindReferences\FindReferencesNavigationService.cs (2)
34protected override FunctionId FunctionId => FunctionId.CommandHandler_FindAllReference;
GoOrFind\GoToBase\GoToBaseNavigationService.cs (2)
36protected override FunctionId FunctionId => FunctionId.CommandHandler_GoToBase;
GoOrFind\GoToImplementation\GoToImplementationNavigationService.cs (2)
35protected override FunctionId FunctionId => FunctionId.CommandHandler_GoToImplementation;
InlineRename\InlineRenameSession.cs (9)
153_inlineRenameSessionDurationLogBlock = Logger.LogBlock(FunctionId.Rename_InlineSession, CancellationToken.None); 202using (Logger.LogBlock(FunctionId.Rename_CreateOpenTextBufferManagerForAllOpenDocs, CancellationToken.None)) 388Logger.Log(FunctionId.Rename_InlineSession_Cancel_NonDocumentChangedWorkspaceChange, KeyValueLogMessage.Create(static (m, args) => 463using (Logger.LogBlock(FunctionId.Rename_ApplyReplacementText, replacementText, _cancellationTokenSource.Token)) 625Logger.Log(FunctionId.Rename_InlineSession_Session, RenameLogMessage.Create( 635Logger.Log(FunctionId.Rename_InlineSession_Session, RenameLogMessage.Create( 800var eventName = previewChanges ? FunctionId.Rename_CommitCoreWithPreview : FunctionId.Rename_CommitCore;
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
228using (Logger.LogBlock(FunctionId.Rename_OnTextBufferChanged, CancellationToken.None)) 544using (Logger.LogBlock(FunctionId.Workspace_Document_GetTextChanges, newDocument.Name, cancellationToken))
InlineRename\UI\SmartRename\SmartRenameViewModel_Telemetry.cs (2)
48TelemetryLogging.Log(FunctionId.Copilot_Rename, KeyValueLogMessage.Create(m => 64TelemetryLogging.Log(FunctionId.Copilot_Rename, KeyValueLogMessage.Create(m =>
IntelliSense\AsyncCompletion\AsyncCompletionLogger.cs (1)
79Logger.Log(FunctionId.Intellisense_AsyncCompletion_Data, KeyValueLogMessage.Create(static m =>
IntelliSense\QuickInfo\QuickInfoSourceProvider.QuickInfoSource.cs (1)
71using (Logger.LogBlock(FunctionId.Get_QuickInfo_Async, cancellationToken))
KeywordHighlighting\HighlighterViewTaggerProvider.cs (1)
99using (Logger.LogBlock(FunctionId.Tagger_Highlighter_TagProducer_ProduceTags, cancellationToken))
LineSeparators\LineSeparatorTaggerProvider.cs (1)
83using (Logger.LogBlock(FunctionId.Tagger_LineSeparator_TagProducer_ProduceTags, cancellationToken))
Logging\FunctionIdOptions.cs (7)
15private static readonly ConcurrentDictionary<FunctionId, Option2<bool>> s_options = []; 17private static readonly Func<FunctionId, Option2<bool>> s_optionCreator = CreateOption; 19private static Option2<bool> CreateOption(FunctionId id) 37private static IEnumerable<FunctionId> GetFunctionIds() 38=> Enum.GetValues<FunctionId>(); 43public static Option2<bool> GetOption(FunctionId id) 46public static Func<FunctionId, bool> CreateFunctionIsEnabledPredicate(IGlobalOptionService globalOptions)
NavigationBar\NavigationBarController_ModelComputation.cs (1)
131using (Logger.LogBlock(FunctionId.NavigationBar_ComputeModelAsync, cancellationToken))
QuickInfo\OnTheFlyDocsView.xaml.cs (4)
230Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Error_Displayed, KeyValueLogMessage.Create(static (m, copilotRequestTime) => 243Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Results_Displayed, KeyValueLogMessage.Create(static (m, args) => 253Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Results_Canceled, KeyValueLogMessage.Create(static (m, stopwatch) => 300Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Loading_State_Entered, KeyValueLogMessage.Create(static (m, _onTheFlyDocsInfo) =>
QuickInfo\OnTheFlyDocsViewFactory.cs (1)
61Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Showed_Link, logLevel: LogLevel.Information);
ReferenceHighlighting\ReferenceHighlightingViewTaggerProvider.cs (1)
143using (Logger.LogBlock(FunctionId.Tagger_ReferenceHighlighting_TagProducer_ProduceTags, cancellationToken))
Remote\SolutionChecksumUpdater.cs (2)
151using (Logger.LogBlock(FunctionId.SolutionChecksumUpdater_SynchronizePrimaryWorkspace, cancellationToken)) 197TelemetryLogging.LogAggregatedCounter(FunctionId.ChecksumUpdater_SynchronizeTextChangesStatus, KeyValueLogMessage.Create(static (m, args) =>
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
81using (Logger.LogBlock(FunctionId.Rename_Tracking_BufferChanged, CancellationToken.None))
Shared\Extensions\ITextSnapshotExtensions.cs (1)
46using (Logger.LogBlock(FunctionId.Formatting_ApplyResultToBuffer, cancellationToken))
SignatureHelp\Controller.Session_ComputeModel.cs (1)
53using (Logger.LogBlock(FunctionId.SignatureHelp_ModelComputation_ComputeModelInBackground, cancellationToken))
SmartIndent\SmartIndent.cs (1)
35using (Logger.LogBlock(FunctionId.SmartIndentation_Start, cancellationToken))
SpellCheck\RoslynSpellCheckFixerProvider.cs (9)
43private async Task<(FunctionId functionId, string? message)?> RenameWordAsync( 75private async Task<(FunctionId functionId, string? message)?> TryRenameAsync(SnapshotSpan span, string replacement, CancellationToken cancellationToken) 81return (FunctionId.SpellCheckFixer_CouldNotFindDocument, null); 86return (FunctionId.SpellCheckFixer_LanguageDoesNotSupportRename, null); 92return (FunctionId.SpellCheckFixer_LanguageCouldNotGetRenameInfo, null); 98return (FunctionId.SpellCheckFixer_RenameSpanNotWithinTokenSpan, null); 105return (FunctionId.SpellCheckFixer_ReplacementTextInvalid, $"Renaming: '{span.GetText()}' to '{replacement}'"); 111return (FunctionId.SpellCheckFixer_TryApplyChangesFailure, null); 123public Task<(FunctionId functionId, string? message)?> TryRenameAsync(SnapshotSpan span, string replacement, CancellationToken cancellationToken)
Suggestions\SuggestedActions\AbstractFixAllSuggestedAction.cs (2)
63FixAllKind.CodeFix => FunctionId.CodeFixes_FixAllOccurrencesSession, 64FixAllKind.Refactoring => FunctionId.Refactoring_FixAllOccurrencesSession,
Suggestions\SuggestedActions\SuggestedAction.cs (2)
119using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.SuggestedAction_Application_Summary, $"Total"); 173FunctionId.CodeFixes_ApplyChanges, KeyValueLogMessage.Create(
Suggestions\SuggestedActionsSource.cs (1)
227Logger.Log(FunctionId.SuggestedActions_HasSuggestedActionsAsync);
Suggestions\SuggestedActionsSource_Async.cs (5)
84using (Logger.LogBlock(FunctionId.SuggestedActions_GetSuggestedActionsAsync, cancellationToken)) 113using var _2 = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.SuggestedAction_Summary, $"Total"); 120using var _3 = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.SuggestedAction_Summary, $"Total.Pri{(int)priority}"); 229using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.SuggestedAction_Summary, $"Total.Pri{priorityProvider.Priority.GetPriorityInt()}.{nameof(GetCodeFixesAsync)}"); 245using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.SuggestedAction_Summary, $"Total.Pri{priorityProvider.Priority.GetPriorityInt()}.{nameof(GetRefactoringsAsync)}");
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (2)
329using (Logger.LogBlock(FunctionId.Tagger_TagSource_RecomputeTags, cancellationToken)) 602using (Logger.LogBlock(FunctionId.Tagger_TagSource_ProcessNewTags, CancellationToken.None))
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (5)
47using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetExtentOfWord, CancellationToken.None)) 105using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfEnclosing, CancellationToken.None)) 137using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfFirstChild, CancellationToken.None)) 173using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfNextSibling, CancellationToken.None)) 225using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfPreviousSibling, CancellationToken.None))
Microsoft.CodeAnalysis.EditorFeatures.Text (2)
Extensions.SnapshotSourceText.cs (1)
352Logger.Log(FunctionId.Workspace_SourceText_GetChangeRanges, "Invalid Snapshots");
ITextImageHelpers.cs (1)
41Logger.Log(FunctionId.Workspace_SourceText_GetChangeRanges, s_textLog, oldImageVersion.VersionNumber, newImageVersion.VersionNumber);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\Editor\FSharpSmartIndentProvider.cs (1)
72using (Logger.LogBlock(FunctionId.SmartIndentation_Start, cancellationToken))
Microsoft.CodeAnalysis.Features (97)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (1)
56using (Logger.LogBlock(FunctionId.Refactoring_GenerateFromMembers_AddConstructorParametersFromMembers, cancellationToken))
AddImport\AbstractAddImportFeatureService.cs (1)
100using (Logger.LogBlock(FunctionId.Refactoring_AddImport, cancellationToken))
ChangeSignature\AbstractChangeSignatureService.cs (1)
230using (Logger.LogBlock(FunctionId.FindReference_ChangeSignature, cancellationToken))
ChangeSignature\ChangeSignatureTelemetryLogger.cs (1)
183Logger.Log(FunctionId.ChangeSignature_Data, KeyValueLogMessage.Create(static m =>
CodeFixes\Service\CodeFixService.cs (9)
101using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.CodeFix_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}.{nameof(GetMostSevereFixAsync)}"); 106FunctionId.CodeFix_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}.{nameof(GetMostSevereFixAsync)}.{nameof(IDiagnosticAnalyzerService.GetDiagnosticsForSpanAsync)}")) 179using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.CodeFix_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}"); 198FunctionId.CodeFix_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}.{nameof(IDiagnosticAnalyzerService.GetDiagnosticsForSpanAsync)}")) 296using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.CodeFix_Summary, $"{nameof(GetDocumentFixAllForIdInSpanAsync)}"); 300FunctionId.CodeFix_Summary, $"{nameof(GetDocumentFixAllForIdInSpanAsync)}.{nameof(IDiagnosticAnalyzerService.GetDiagnosticsForSpanAsync)}")) 545using var _ = TelemetryLogging.LogBlockTime(FunctionId.CodeFix_Delay, logMessage, CodeFixTelemetryDelay); 554using (RoslynEventSource.LogInformationalBlock(FunctionId.CodeFixes_GetCodeFixesAsync, fixerName, cancellationToken)) 727using (RoslynEventSource.LogInformationalBlock(FunctionId.CodeFixes_GetCodeFixesAsync, provider, cancellationToken))
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (6)
61var functionId = FunctionId.CodeFixes_FixAllOccurrencesComputation_Document_Merge; 82FunctionId.CodeFixes_FixAllOccurrencesComputation_Document_Fixes, 148FunctionId.CodeFixes_FixAllOccurrencesComputation_Project_Fixes, 162var functionId = FunctionId.CodeFixes_FixAllOccurrencesComputation_Project_Merge;
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (6)
115var functionId = fixAllKind switch 117FixAllKind.CodeFix => FunctionId.CodeFixes_FixAllOccurrencesPreviewChanges, 118FixAllKind.Refactoring => FunctionId.Refactoring_FixAllOccurrencesPreviewChanges, 159var functionId = fixAllKind switch 161FixAllKind.CodeFix => FunctionId.CodeFixes_FixAllOccurrencesComputation, 162FixAllKind.Refactoring => FunctionId.Refactoring_FixAllOccurrencesComputation,
CodeRefactorings\CodeRefactoringService.cs (4)
186using (TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.CodeRefactoring_Summary, $"Pri{priority.GetPriorityInt()}")) 187using (Logger.LogBlock(FunctionId.Refactoring_CodeRefactoringService_GetRefactoringsAsync, cancellationToken)) 215using (RoslynEventSource.LogInformationalBlock(FunctionId.Refactoring_CodeRefactoringService_GetRefactoringsAsync, providerName, cancellationToken)) 216using (TelemetryLogging.LogBlockTime(FunctionId.CodeRefactoring_Delay, logMessage, CodeRefactoringTelemetryDelay))
Completion\Log\CompletionProvidersLogger.cs (1)
86Logger.Log(FunctionId.Intellisense_CompletionProviders_Data, KeyValueLogMessage.Create(static m =>
Completion\Providers\AbstractKeywordCompletionProvider.cs (1)
37using (Logger.LogBlock(FunctionId.Completion_KeywordCompletionProvider_GetItemsWorker, cancellationToken))
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
324using (Logger.LogBlock(FunctionId.Completion_SymbolCompletionProvider_GetItemsWorker, cancellationToken))
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
43using (Logger.LogBlock(FunctionId.Completion_ExtensionMethodImportCompletionProvider_GetCompletionItemsAsync, cancellationToken))
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
35using (Logger.LogBlock(FunctionId.Completion_TypeImportCompletionProvider_GetCompletionItemsAsync, cancellationToken))
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (1)
32Logger.Log(FunctionId.Completion_SemanticSnippets, $"Name: {snippetIdentifier}", LogLevel.Information);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
221using (Logger.LogBlock(FunctionId.AbstractConvertTupleToStructCodeRefactoringProvider_ConvertToStructAsync, cancellationToken))
Copilot\CopilotChangeAnalysisUtilities.cs (1)
89return Logger.LogBlock(FunctionId.Copilot_AnalyzeChange, KeyValueLogMessage.Create(static (d, args) =>
Diagnostics\DiagnosticAnalyzerTelemetry.cs (1)
70Logger.Log(FunctionId.DiagnosticAnalyzerDriver_AnalyzerTypeCount, KeyValueLogMessage.Create(m =>
Diagnostics\Log\DiagnosticLogger.cs (1)
23Logger.Log(FunctionId.Diagnostics_HyperLink, KeyValueLogMessage.Create(static (m, args) =>
Diagnostics\Service\DocumentAnalysisExecutor.cs (4)
98Logger.Log(FunctionId.Diagnostics_SyntaxDiagnostic, 111Logger.Log(FunctionId.Diagnostics_SemanticDiagnostic, (a, d, e) => $"{a}, ({d.Id}, {d.Project.Id}), Enabled:{e}", analyzer, textDocument, isEnabled); 211using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.RequestDiagnostics_Summary, $"{nameof(GetSyntaxDiagnosticsAsync)}.{nameof(GetAnalysisResultAsync)}"); 247using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.RequestDiagnostics_Summary, $"{nameof(GetSemanticDiagnosticsAsync)}.{nameof(GetAnalysisResultAsync)}");
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (2)
33using (Logger.LogBlock(FunctionId.Diagnostics_ProjectDiagnostic, GetProjectLogMessage, project, analyzers, cancellationToken)) 75Logger.Log(FunctionId.Diagnostics_ProjectDiagnostic, p => $"Failed to Load Successfully ({p.FilePath ?? p.Name})", project);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (3)
104using var _4 = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.RequestDiagnostics_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}"); 238using var _2 = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.RequestDiagnostics_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}.Incremental"); 248using var _2 = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.RequestDiagnostics_Summary, $"Pri{priorityProvider.Priority.GetPriorityInt()}.Document");
EditAndContinue\DebuggingSession.cs (1)
969public void SetTelemetryLogger(Action<FunctionId, LogMessage> logger, Func<int> getNextId)
EditAndContinue\DebuggingSessionTelemetry.cs (5)
72public static void Log(Data data, Action<FunctionId, LogMessage> log, Func<int> getNextId) 79log(FunctionId.Debugging_EncSession, KeyValueLogMessage.Create(static (map, args) => 94log(FunctionId.Debugging_EncSession_EditSession, KeyValueLogMessage.Create(map => 139log(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, KeyValueLogMessage.Create(map => 149log(FunctionId.Debugging_EncSession_EditSession_RudeEdit, KeyValueLogMessage.Create(map =>
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
116using (Logger.LogBlock(FunctionId.Renamer_FindRenameLocationsAsync, cancellationToken))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (12)
49Logger.Log(FunctionId.WorkCoordinatorRegistrationService_Register, KeyValueLogMessage.Create(m => 58Logger.Log(FunctionId.WorkCoordinatorRegistrationService_Unregister, KeyValueLogMessage.Create(m => 70Logger.Log(FunctionId.WorkCoordinatorRegistrationService_Reanalyze, KeyValueLogMessage.Create(m => 84FunctionId.IncrementalAnalyzerProcessor_ActiveFileAnalyzers, FunctionId.IncrementalAnalyzerProcessor_ActiveFileAnalyzer, 90FunctionId.IncrementalAnalyzerProcessor_Analyzers, FunctionId.IncrementalAnalyzerProcessor_Analyzer, 96FunctionId analyzersId, FunctionId analyzerId, int correlationId, string workspaceKind, ImmutableArray<IUnitTestingIncrementalAnalyzer> reordered) 122Logger.Log(FunctionId.WorkCoordinator_ShutdownTimeout, KeyValueLogMessage.Create(m => 133Logger.Log(FunctionId.WorkCoordinator_Shutdown, KeyValueLogMessage.Create(m => 188Logger.Log(FunctionId.IncrementalAnalyzerProcessor_Shutdown, KeyValueLogMessage.Create(m =>
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.AbstractUnitTestingPriorityProcessor.cs (1)
70using (Logger.LogBlock(FunctionId.WorkCoordinator_WaitForHigherPriorityOperationsAsync, CancellationToken))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncDocumentWorkItemQueue.cs (1)
120Logger.Log(FunctionId.WorkCoordinator_AsyncWorkItemQueue_FirstItem);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncProjectWorkItemQueue.cs (1)
26Logger.Log(FunctionId.WorkCoordinator_AsyncWorkItemQueue_LastItem);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingLowPriorityProcessor.cs (2)
102Logger.Log(FunctionId.WorkCoordinator_Project_Enqueue, s_enqueueLogger, Environment.TickCount, item.ProjectId, !added); 131using (Logger.LogBlock(FunctionId.WorkCoordinator_ProcessProjectAsync, w => w.ToString(), workItem, cancellationToken))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (2)
69Logger.Log(FunctionId.WorkCoordinator_DocumentWorker_Enqueue, s_enqueueLogger, Environment.TickCount, item.DocumentId, !added); 203using (Logger.LogBlock(FunctionId.WorkCoordinator_ProcessDocumentAsync, w => w.ToString(), workItem, cancellationToken))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (5)
132Logger.Log(FunctionId.WorkCoordinator_SemanticChange_EnqueueFromType, symbol.Name); 159Logger.Log(FunctionId.WorkCoordinator_SemanticChange_EnqueueFromMember, symbol.Name); 240Logger.Log(FunctionId.WorkCoordinator_SemanticChange_FullProjects, internalVisibleToAssembly == null ? "full" : "internals"); 263Logger.Log(FunctionId.WorkCoordinator_SemanticChange_Enqueue, s_enqueueLogger, Environment.TickCount, documentId, changedMember != null); 379Logger.Log(FunctionId.WorkCoordinator_Project_Enqueue, s_enqueueLogger, Environment.TickCount, projectId);
FullyQualify\AbstractFullyQualifyService.cs (1)
65using (Logger.LogBlock(FunctionId.Refactoring_FullyQualify, cancellationToken))
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
268using (Logger.LogBlock(FunctionId.Refactoring_GenerateFromMembers_GenerateConstructorFromMembers, cancellationToken))
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
174using (Logger.LogBlock(FunctionId.Refactoring_GenerateFromMembers_GenerateEqualsAndGetHashCode, cancellationToken))
GenerateType\AbstractGenerateTypeService.cs (1)
71using (Logger.LogBlock(FunctionId.Refactoring_GenerateType, cancellationToken))
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
68using (Logger.LogBlock(FunctionId.Refactoring_IntroduceVariable, cancellationToken))
MetadataAsSource\TelemetryMessage.cs (1)
25_logBlock = Logger.LogBlock(FunctionId.NavigateToExternalSources, logMessage, cancellationToken);
NavigateTo\NavigateToSearcher.cs (1)
144using var navigateToSearch = Logger.LogBlock(FunctionId.NavigateTo_Search, KeyValueLogMessage.Create(LogType.UserAction), cancellationToken);
QuickInfo\OnTheFlyDocsLogger.cs (1)
43Logger.Log(FunctionId.Copilot_On_The_Fly_Docs_Get_Counts, KeyValueLogMessage.Create(static m =>
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
82using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateConstructor, cancellationToken))
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
31using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateDefaultConstructors, cancellationToken))
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
27using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateEnumMember, cancellationToken))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (1)
32using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateMethod, cancellationToken))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
29using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateMethod, cancellationToken))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
33using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateMethod, cancellationToken))
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (1)
37using (Logger.LogBlock(FunctionId.Refactoring_GenerateMember_GenerateVariable, cancellationToken))
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
62using (Logger.LogBlock(FunctionId.Refactoring_ImplementInterface, cancellationToken))
ValueTracking\ValueTrackingService.cs (2)
32using var logger = Logger.LogBlock(FunctionId.ValueTracking_TrackValueSource, cancellationToken, LogLevel.Information); 62using var logger = Logger.LogBlock(FunctionId.ValueTracking_TrackValueSource, cancellationToken, LogLevel.Information);
Microsoft.CodeAnalysis.LanguageServer (16)
Logging\RoslynLogger.cs (12)
19private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 20private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = []; 80var eventName = GetEventName(FunctionId.NonFatalWatson); 96public bool IsEnabled(FunctionId functionId) 99public void Log(FunctionId functionId, LogMessage logMessage) 121public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int blockId, CancellationToken cancellationToken) 140public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int blockId, int delta, CancellationToken cancellationToken) 223private static string GetEventName(FunctionId id) 226private static string GetPropertyName(FunctionId id, string name) 229private static string GetTelemetryName(FunctionId id, char separator) 230=> Enum.GetName(typeof(FunctionId), id)!.Replace('_', separator).ToLowerInvariant(); 241private static void AddProperties(List<KeyValuePair<string, object?>> properties, FunctionId id, LogMessage logMessage, int? delta)
Program.cs (1)
161RoslynLog.Logger.Log(RoslynLog.FunctionId.VSCode_LanguageServer_Started, logLevel: RoslynLog.LogLevel.Information);
Telemetry\VSCodeRequestTelemetryLogger.cs (3)
26Logger.Log(FunctionId.VSCode_Projects_Load_Completed, logLevel: LogLevel.Information); 31Logger.Log(FunctionId.VSCode_Project_Load_Started, logLevel: LogLevel.Information); 36TelemetryLogging.LogAggregatedCounter(FunctionId.LSP_FindDocumentInWorkspace, KeyValueLogMessage.Create(m =>
Microsoft.CodeAnalysis.LanguageServer.Protocol (14)
Extensions\ProtocolConversions.cs (2)
158Logger.Log(FunctionId.LSPCompletion_MissingLSPCompletionInvokeKind); 171Logger.Log(FunctionId.LSPCompletion_MissingLSPCompletionTriggerKind);
Features\CodeCleanup\AbstractCodeCleanupService.cs (4)
86using (Logger.LogBlock(FunctionId.CodeCleanup_Format, cancellationToken)) 107using (Logger.LogBlock(FunctionId.CodeCleanup_RemoveUnusedImports, cancellationToken)) 133using (Logger.LogBlock(FunctionId.CodeCleanup_SortImports, cancellationToken)) 174using (Logger.LogBlock(FunctionId.CodeCleanup_ApplyCodeFixesAsync, diagnosticId, cancellationToken))
Handler\Completion\Extensions.cs (1)
66Logger.Log(FunctionId.LSP_CompletionListCacheMiss, KeyValueLogMessage.NoProperty);
Handler\ServerLifetime\InitializeHandler.cs (1)
41Logger.Log(FunctionId.LSP_Initialize, KeyValueLogMessage.Create(m =>
Handler\Telemetry\RequestTelemetryLogger.cs (5)
35TelemetryLogging.LogAggregatedCounter(FunctionId.LSP_FindDocumentInWorkspace, KeyValueLogMessage.Create(m => 48TelemetryLogging.LogAggregatedCounter(FunctionId.LSP_UsedForkedSolution, KeyValueLogMessage.Create(m => 66TelemetryLogging.LogAggregatedHistogram(FunctionId.LSP_TimeInQueue, KeyValueLogMessage.Create(m => 74TelemetryLogging.LogAggregatedHistogram(FunctionId.LSP_RequestDuration, KeyValueLogMessage.Create(m => 92TelemetryLogging.LogAggregatedCounter(FunctionId.LSP_RequestCounter, KeyValueLogMessage.Create(m =>
Workspaces\LspWorkspaceRegistrationService.cs (1)
34Logger.Log(FunctionId.RegisterWorkspace, KeyValueLogMessage.Create(LogType.Trace, static (m, workspace) =>
Microsoft.CodeAnalysis.Remote.ServiceHub (60)
Host\AssetProvider.cs (4)
81using (Logger.LogBlock(FunctionId.AssetService_SynchronizeSolutionAssetsAsync, Checksum.GetChecksumLogInfo, solutionChecksum, cancellationToken)) 90Logger.Log(FunctionId.AssetService_Perf, KeyValueLogMessage.Create( 142using (Logger.LogBlock(FunctionId.AssetService_SynchronizeProjectAssetsAsync, message: null, cancellationToken)) 251using (Logger.LogBlock(FunctionId.AssetService_SynchronizeAssetsAsync, Checksum.GetChecksumsLogInfo, checksums, cancellationToken))
Host\RemoteSolutionCache.cs (1)
151Logger.Log(FunctionId.RemoteWorkspace_SolutionCachingStatistics, KeyValueLogMessage.Create(static (m, @this) =>
Host\SolutionAssetCache.cs (2)
78using (Logger.LogBlock(FunctionId.AssetStorage_TryGetAsset, Checksum.GetChecksumLogInfo, checksum, CancellationToken.None)) 130using (Logger.LogBlock(FunctionId.AssetStorage_CleanAssets, cancellationToken))
Host\TestUtils.cs (1)
79Logger.Log(FunctionId.SolutionCreator_AssetDifferences, result);
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (3)
40using (RoslynLogger.LogBlock(FunctionId.RemoteHostService_SynchronizePrimaryWorkspaceAsync, Checksum.GetChecksumLogInfo, solutionChecksum, cancellationToken)) 69TelemetryLogging.LogAggregatedCounter(FunctionId.RemoteHostService_SynchronizeTextAsyncStatus, KeyValueLogMessage.Create(static (m, args) => 83using (RoslynLogger.LogBlock(FunctionId.RemoteHostService_SynchronizeTextAsync, cancellationToken))
Services\CodeLensReferences\RemoteCodeLensReferencesService.cs (4)
45using (Logger.LogBlock(FunctionId.CodeAnalysisService_GetReferenceCountAsync, documentId.ProjectId.DebugName, cancellationToken)) 68using (Logger.LogBlock(FunctionId.CodeAnalysisService_FindReferenceLocationsAsync, documentId.ProjectId.DebugName, cancellationToken)) 86using (Logger.LogBlock(FunctionId.CodeAnalysisService_FindReferenceMethodsAsync, documentId.ProjectId.DebugName, cancellationToken)) 106using (Logger.LogBlock(FunctionId.CodeAnalysisService_GetFullyQualifiedName, documentId.ProjectId.DebugName, cancellationToken))
Services\DiagnosticAnalyzer\PerformanceTrackerService.cs (3)
71TelemetryLogging.LogAggregatedHistogram(FunctionId.PerformAnalysis_Summary, $"IndividualTimes", delay); 88TelemetryLogging.Log(FunctionId.PerformAnalysis_Delay, logMessage); 92Logger.Log(FunctionId.PerformanceTrackerService_AddSnapshot, s_snapshotLogger, snapshot, unitCount, forSpanAnalysis);
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (3)
45using (TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.PerformAnalysis_Summary, $"Total")) 46using (RoslynLogger.LogBlock(FunctionId.CodeAnalysisService_CalculateDiagnosticsAsync, arguments.ProjectId.DebugName, cancellationToken)) 108using (RoslynLogger.LogBlock(FunctionId.CodeAnalysisService_ReportAnalyzerPerformance, cancellationToken))
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (4)
56RoslynLogger.Log(FunctionId.RemoteHost_Connect, KeyValueLogMessage.Create(static (m, hostProcessId) => 77public ValueTask EnableLoggingAsync(ImmutableArray<string> loggerTypeNames, ImmutableArray<FunctionId> functionIds, CancellationToken cancellationToken) 81var functionIdsSet = new HashSet<FunctionId>(functionIds); 82bool logChecker(FunctionId id) => functionIdsSet.Contains(id);
Services\ProcessTelemetry\RemoteProcessTelemetryService.PerformanceReporter.cs (2)
52using (RoslynLogger.LogBlock(FunctionId.Diagnostics_GeneratePerformaceReport, cancellationToken)) 63RoslynLogger.Log(FunctionId.Diagnostics_AnalyzerPerformanceInfo2, KeyValueLogMessage.Create(m =>
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
340Internal.Log.Logger.Log(FunctionId.RemoteSemanticClassificationCacheService_ExceptionInCacheRead);
src\VisualStudio\Core\Def\Telemetry\Shared\AbstractAggregatingLog.cs (2)
29private readonly FunctionId _functionId; 39public AbstractAggregatingLog(TelemetrySession session, FunctionId functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\AggregatingCounterLog.cs (1)
19public AggregatingCounterLog(TelemetrySession session, FunctionId functionId) : base(session, functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\AggregatingHistogramLog.cs (1)
29public AggregatingHistogramLog(TelemetrySession session, FunctionId functionId, double[]? bucketBoundaries) : base(session, functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogger.cs (13)
42public override bool IsEnabled(FunctionId functionId) 82private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 83private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = []; 87internal static string GetEventName(FunctionId id) 90internal static string GetPropertyName(FunctionId id, string name) 93private static string GetTelemetryName(FunctionId id, char separator) 94=> Enum.GetName(typeof(FunctionId), id)!.Replace('_', separator).ToLowerInvariant(); 99public abstract bool IsEnabled(FunctionId functionId); 105public void Log(FunctionId functionId, LogMessage logMessage) 124public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int blockId, CancellationToken cancellationToken) 143public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int blockId, int delta, CancellationToken cancellationToken) 178private static void SetProperties(TelemetryEvent telemetryEvent, FunctionId functionId, LogMessage logMessage, int? delta = null) 201private static void AppendProperties(TelemetryEvent telemetryEvent, FunctionId functionId, KeyValueLogMessage logMessage)
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogProvider.cs (12)
21/// Manages instances of <see cref="VisualStudioTelemetryLog"/> to provide in <see cref="GetLog(FunctionId)"/> 23private ImmutableDictionary<FunctionId, VisualStudioTelemetryLog> _logs = ImmutableDictionary<FunctionId, VisualStudioTelemetryLog>.Empty; 26/// Manages instances of <see cref="AggregatingHistogramLog"/> to provide in <see cref="GetHistogramLog(FunctionId, double[])"/> 28private ImmutableDictionary<FunctionId, AggregatingHistogramLog> _histogramLogs = ImmutableDictionary<FunctionId, AggregatingHistogramLog>.Empty; 31/// Manages instances of <see cref="AggregatingCounterLog"/> to provide in <see cref="GetCounterLog(FunctionId)"/> 33private ImmutableDictionary<FunctionId, AggregatingCounterLog> _counterLogs = ImmutableDictionary<FunctionId, AggregatingCounterLog>.Empty; 53public ITelemetryBlockLog? GetLog(FunctionId functionId) 64public ITelemetryBlockLog? GetHistogramLog(FunctionId functionId, double[]? bucketBoundaries) 76public ITelemetryLog? GetCounterLog(FunctionId functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\VisualStudioTelemetryLog.cs (2)
14private readonly FunctionId _functionId; 16public VisualStudioTelemetryLog(ILogger telemetryLogger, FunctionId functionId)
src\VisualStudio\Core\Def\Watson\FaultReporter.cs (1)
139eventName: TelemetryLogger.GetEventName(FunctionId.NonFatalWatson),
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (4)
TelemetryLoggerTests.cs (4)
34logger.Log(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, LogMessage.Create("test", level)); 43logger.Log(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, KeyValueLogMessage.Create(p => 67logger.LogBlockStart(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, KeyValueLogMessage.Create(p => p.Add("test", "start"), logLevel: LogLevel.Information), blockId: 1, CancellationToken.None); 72logger.LogBlockEnd(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, KeyValueLogMessage.Create(p => p.Add("test", "end")), blockId: 1, delta: 100, CancellationToken.None);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
ServiceHubRemoteHostClient.cs (1)
63using (Logger.LogBlock(FunctionId.ServiceHubRemoteHostClient_CreateAsync, KeyValueLogMessage.NoProperty, cancellationToken))
Microsoft.CodeAnalysis.Workspaces (173)
CaseCorrection\AbstractCaseCorrectionService.cs (3)
46using (Logger.LogBlock(FunctionId.CaseCorrection_CaseCorrect, cancellationToken)) 51using (Logger.LogBlock(FunctionId.CaseCorrection_AddReplacements, cancellationToken)) 56using (Logger.LogBlock(FunctionId.CaseCorrection_ReplaceTokens, cancellationToken))
CodeActions\CodeAction.cs (1)
266using var _ = TelemetryLogging.LogBlockTimeAggregatedHistogram(FunctionId.SuggestedAction_Preview_Summary, $"Total");
CodeActions\Operations\ApplyChangesOperation.cs (9)
61result ? FunctionId.ApplyChangesOperation_WorkspaceVersionMatch_ApplicationSucceeded : FunctionId.ApplyChangesOperation_WorkspaceVersionMatch_ApplicationFailed, 86Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_IncompatibleSolutionChange, logLevel: LogLevel.Information); 110Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_IncompatibleProjectChange, logLevel: LogLevel.Information); 121Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_NoChangedDocument, logLevel: LogLevel.Information); 134Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_NoTextChange, logLevel: LogLevel.Information); 142Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_DocumentRemoved, logLevel: LogLevel.Information); 151Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationFailed_TextChangeConflict, logLevel: LogLevel.Information); 159Logger.Log(FunctionId.ApplyChangesOperation_WorkspaceVersionMismatch_ApplicationSucceeded, logLevel: LogLevel.Information);
CodeCleanup\AbstractCodeCleanerService.cs (6)
31using (Logger.LogBlock(FunctionId.CodeCleanup_CleanupAsync, cancellationToken)) 75using (Logger.LogBlock(FunctionId.CodeCleanup_Cleanup, cancellationToken)) 462using (Logger.LogBlock(FunctionId.CodeCleanup_IterateAllCodeCleanupProviders, cancellationToken)) 494using (Logger.LogBlock(FunctionId.CodeCleanup_IterateOneCodeCleanup, GetCodeCleanerTypeName, codeCleaner, cancellationToken)) 544using (Logger.LogBlock(FunctionId.CodeCleanup_IterateAllCodeCleanupProviders, cancellationToken)) 571using (Logger.LogBlock(FunctionId.CodeCleanup_IterateOneCodeCleanup, GetCodeCleanerTypeName, codeCleaner, cancellationToken))
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (2)
58FunctionId.CodeFixes_FixAllOccurrencesComputation_Document_Diagnostics, 71FunctionId.CodeFixes_FixAllOccurrencesComputation_Project_Diagnostics,
CodeFixesAndRefactorings\FixAllLogger.cs (12)
43FunctionId functionId; 48functionId = FunctionId.CodeFixes_FixAllOccurrencesContext; 53functionId = FunctionId.Refactoring_FixAllOccurrencesContext; 110var functionId = fixAllKind switch 112FixAllKind.CodeFix => FunctionId.CodeFixes_FixAllOccurrencesComputation, 113FixAllKind.Refactoring => FunctionId.Refactoring_FixAllOccurrencesComputation, 136var functionId = fixAllKind switch 138FixAllKind.CodeFix => FunctionId.CodeFixes_FixAllOccurrencesPreviewChanges, 139FixAllKind.Refactoring => FunctionId.Refactoring_FixAllOccurrencesPreviewChanges, 157Logger.Log(FunctionId.CodeFixes_FixAllOccurrencesComputation_Document_Diagnostics, KeyValueLogMessage.Create(m => 167Logger.Log(FunctionId.CodeFixes_FixAllOccurrencesComputation_Project_Diagnostics, KeyValueLogMessage.Create(m => 175public static void LogFixesToMergeStats(FunctionId functionId, int correlationId, int count)
FindSymbols\Declarations\DeclarationFinder.cs (2)
30using (Logger.LogBlock(FunctionId.SymbolFinder_Project_AddDeclarationsAsync, cancellationToken)) 80using (Logger.LogBlock(FunctionId.SymbolFinder_Assembly_AddDeclarationsAsync, cancellationToken))
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (4)
60var functionId = kind switch 62DependentTypesKind.DerivedClasses => FunctionId.DependentTypeFinder_FindAndCacheDerivedClassesAsync, 63DependentTypesKind.DerivedInterfaces => FunctionId.DependentTypeFinder_FindAndCacheDerivedInterfacesAsync, 64DependentTypesKind.ImplementingTypes => FunctionId.DependentTypeFinder_FindAndCacheImplementingTypesAsync,
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (1)
324using (Logger.LogBlock(FunctionId.FindReference_ProcessDocumentAsync, cancellationToken))
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (2)
56using (Logger.LogBlock(FunctionId.SymbolFinder_Solution_Predicate_FindSourceDeclarationsAsync, cancellationToken)) 101using (Logger.LogBlock(FunctionId.SymbolFinder_Project_Predicate_FindSourceDeclarationsAsync, cancellationToken))
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (4)
29using (Logger.LogBlock(FunctionId.SymbolFinder_Solution_Name_FindSourceDeclarationsAsync, cancellationToken)) 49using (Logger.LogBlock(FunctionId.SymbolFinder_Project_Name_FindSourceDeclarationsAsync, cancellationToken)) 80using (Logger.LogBlock(FunctionId.SymbolFinder_Solution_Pattern_FindSourceDeclarationsAsync, cancellationToken)) 108using (Logger.LogBlock(FunctionId.SymbolFinder_Project_Pattern_FindSourceDeclarationsAsync, cancellationToken))
FindSymbols\SymbolFinder_FindLiteralReferences.cs (1)
22using (Logger.LogBlock(FunctionId.FindReference, cancellationToken))
FindSymbols\SymbolFinder_FindReferences_Current.cs (1)
29using (Logger.LogBlock(FunctionId.FindReference, cancellationToken))
FindSymbols\SymbolFinder_FindRenamableReferences.cs (1)
20using (Logger.LogBlock(FunctionId.FindReference_Rename, cancellationToken))
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (3)
36using (Logger.LogBlock(FunctionId.SymbolTreeInfo_TryLoadOrCreate, cancellationToken)) 54using (Logger.LogBlock(FunctionId.SymbolTreeInfo_Create, cancellationToken)) 266Logger.Log(FunctionId.SymbolTreeInfo_ExceptionInCacheRead);
Log\AggregateLogger.cs (4)
112public bool IsEnabled(FunctionId functionId) 115public void Log(FunctionId functionId, LogMessage logMessage) 129public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 143public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)
Log\EmptyLogger.cs (4)
16public bool IsEnabled(FunctionId functionId) 19public void Log(FunctionId functionId, LogMessage logMessage) 23public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 27public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)
Log\EtwLogger.cs (5)
14internal sealed class EtwLogger(Func<FunctionId, bool> isEnabledPredicate) : ILogger 21public bool IsEnabled(FunctionId functionId) 24public void Log(FunctionId functionId, LogMessage logMessage) 27public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 30public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)
Log\FunctionIdExtensions.cs (3)
13private static readonly Lazy<ImmutableDictionary<FunctionId, string>> s_functionIdsToString = new( 14() => Enum.GetValues<FunctionId>().ToImmutableDictionary(f => f, f => f.ToString())); 16public static string Convert(this FunctionId functionId) => s_functionIdsToString.Value[functionId];
Log\RoslynEventSource.cs (5)
46public void Log(string message, FunctionId functionId) 50public void BlockStart(string message, FunctionId functionId, int blockId) 54public void BlockStop(FunctionId functionId, int tick, int blockId) 62public void BlockCanceled(FunctionId functionId, int tick, int blockId) 108var functions = from f in typeof(FunctionId).GetFields()
Log\RoslynEventSource.LogBlock.cs (6)
22public static LogBlock LogInformationalBlock(FunctionId functionId, object entity, CancellationToken cancellationToken) 32public static LogBlock LogInformationalBlock(FunctionId functionId, string message, CancellationToken cancellationToken) 41private readonly FunctionId _functionId; 57FunctionId functionId, 77FunctionId functionId, 89FunctionId functionId,
Log\TraceLogger.cs (5)
14internal sealed class TraceLogger(Func<FunctionId, bool>? isEnabledPredicate) : ILogger 18public bool IsEnabled(FunctionId functionId) 21public void Log(FunctionId functionId, LogMessage logMessage) 24public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 27public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)
Log\WorkspaceErrorLogger.cs (1)
22=> Logger.Log(FunctionId.Extension_Exception, (source, exception) => source.GetType().Name + " : " + ToLogFormat(exception), source, exception, LogLevel.Error);
Rename\ConflictEngine\ConflictResolver.cs (1)
55using (Logger.LogBlock(FunctionId.Renamer_ResolveConflictsAsync, cancellationToken))
Rename\LightweightRenameLocations.cs (1)
80using (Logger.LogBlock(FunctionId.Renamer_FindRenameLocationsAsync, cancellationToken))
Rename\Renamer.cs (1)
155using (Logger.LogBlock(FunctionId.Renamer_RenameSymbolAsync, cancellationToken))
Rename\SymbolicRenameLocations.cs (1)
61using (Logger.LogBlock(FunctionId.Rename_AllRenameLocations, cancellationToken))
Serialization\SerializerService.cs (3)
54using (Logger.LogBlock(FunctionId.Serializer_CreateChecksum, s_logKind, kind, cancellationToken)) 88using (Logger.LogBlock(FunctionId.Serializer_Serialize, s_logKind, kind, cancellationToken)) 237using (Logger.LogBlock(FunctionId.Serializer_Deserialize, s_logKind, kind, cancellationToken))
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
64public void ReportStatisticsAndClear(FunctionId functionId)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (2)
68using (Logger.LogBlock(FunctionId.Formatting_AggregateCreateTextChanges, cancellationToken)) 100using (Logger.LogBlock(FunctionId.Formatting_AggregateCreateFormattedRoot, cancellationToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (6)
115using (Logger.LogBlock(FunctionId.Formatting_Format, FormatSummary, cancellationToken)) 224using (Logger.LogBlock(FunctionId.Formatting_CollectTokenOperation, cancellationToken)) 348using (Logger.LogBlock(FunctionId.Formatting_ApplyAlignOperation, cancellationToken)) 378using (Logger.LogBlock(FunctionId.Formatting_ApplyAnchorOperation, cancellationToken)) 433using (Logger.LogBlock(FunctionId.Formatting_ApplySpaceAndLine, cancellationToken)) 490using (Logger.LogBlock(FunctionId.Formatting_BuildContext, cancellationToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (2)
56using (Logger.LogBlock(FunctionId.Formatting_CreateTextChanges, cancellationToken)) 90using (Logger.LogBlock(FunctionId.Formatting_CreateFormattedRoot, cancellationToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\ILogger.cs (4)
17bool IsEnabled(FunctionId functionId); 22void Log(FunctionId functionId, LogMessage logMessage); 27void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken); 32void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (16)
43private static bool TryGetActiveLogger(FunctionId functionId, [NotNullWhen(true)] out ILogger? activeLogger) 59public static void Log(FunctionId functionId, string? message = null, LogLevel logLevel = LogLevel.Debug) 71public static void Log(FunctionId functionId, Func<string> messageGetter, LogLevel logLevel = LogLevel.Debug) 86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug) 128public static void Log<TArg0, TArg1, TArg2, TArg3>(FunctionId functionId, Func<TArg0, TArg1, TArg2, TArg3, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3, LogLevel logLevel = LogLevel.Debug) 141public static void Log(FunctionId functionId, LogMessage logMessage) 159public static IDisposable LogBlock(FunctionId functionId, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 165public static IDisposable LogBlock(FunctionId functionId, string? message, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 174public static IDisposable LogBlock(FunctionId functionId, Func<string> messageGetter, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 210public static IDisposable LogBlock<TArg0, TArg1, TArg2, TArg3>(FunctionId functionId, Func<TArg0, TArg1, TArg2, TArg3, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, TArg3 arg3, CancellationToken token, LogLevel logLevel = LogLevel.Trace) 218public static IDisposable LogBlock(FunctionId functionId, LogMessage logMessage, CancellationToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
19public static IDisposable CreateLogBlock(ILogger logger, FunctionId functionId, LogMessage message, int blockId, CancellationToken cancellationToken) 40private FunctionId _functionId; 44public void Construct(ILogger logger, FunctionId functionId, LogMessage logMessage, int blockId, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\BKTree.Serialization.cs (1)
30Logger.Log(FunctionId.BKTree_ExceptionInCacheRead);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (1)
126using (Logger.LogBlock(FunctionId.Misc_NonReentrantLock_BlockingWait, cancellationToken))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
41Logger.Log(FunctionId.SemanticModelReuseLanguageService_TryGetSpeculativeSemanticModelAsync_Equivalent, KeyValueLogMessage.Create(static (m, _logAggregator) =>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (1)
61using (Logger.LogBlock(FunctionId.Simplifier_ReduceAsync, cancellationToken))
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
247Logger.Log(FunctionId.SQLite_SqlException, SQLitePersistentStorage.GetLogMessage(ex));
Storage\SQLite\v2\SQLitePersistentStorage.cs (1)
172Logger.Log(FunctionId.SQLite_StorageDisabled, GetLogMessage(exception));
Storage\StorageDatabaseLogger.cs (1)
40Logger.Log(FunctionId.StorageDatabase_Exceptions, KeyValueLogMessage.Create(static (m, ex) =>
Telemetry\IRemoteProcessTelemetryService.cs (1)
17ValueTask EnableLoggingAsync(ImmutableArray<string> loggerTypeNames, ImmutableArray<FunctionId> functionIds, CancellationToken cancellationToken);
Telemetry\ITelemetryLogProvider.cs (3)
15ITelemetryBlockLog? GetLog(FunctionId functionId); 23ITelemetryBlockLog? GetHistogramLog(FunctionId functionId, double[]? bucketBoundaries = null); 29ITelemetryLog? GetCounterLog(FunctionId functionId);
Telemetry\TelemetryLogging.cs (9)
37public static void Log(FunctionId functionId, KeyValueLogMessage logMessage) 51public static IDisposable? LogBlockTime(FunctionId functionId, KeyValueLogMessage logMessage, int minThresholdMs = -1) 60public static void LogAggregatedHistogram(FunctionId functionId, TelemetryLoggingInterpolatedStringHandler name, long value) 76public static void LogAggregatedHistogram(FunctionId functionId, KeyValueLogMessage logMessage) 90public static IDisposable? LogBlockTimeAggregatedHistogram(FunctionId functionId, TelemetryLoggingInterpolatedStringHandler metricName, int minThresholdMs = -1) 103public static void LogAggregatedCounter(FunctionId functionId, KeyValueLogMessage logMessage) 115public static ITelemetryBlockLog? GetLog(FunctionId functionId) 123private static ITelemetryBlockLog? GetHistogramLog(FunctionId functionId, double[]? bucketBoundaries = null) 128private static ITelemetryLog? GetCounterLog(FunctionId functionId)
TemporaryStorage\TemporaryStorageService.cs (3)
111using (Logger.LogBlock(FunctionId.TemporaryStorageServiceFactory_WriteText, cancellationToken)) 152using (Logger.LogBlock(FunctionId.TemporaryStorageServiceFactory_WriteStream, CancellationToken.None)) 281using (Logger.LogBlock(FunctionId.TemporaryStorageServiceFactory_ReadText, cancellationToken))
TemporaryStorage\TemporaryStorageService.TemporaryStorageStreamHandle.cs (1)
23using (Logger.LogBlock(FunctionId.TemporaryStorageServiceFactory_ReadStream, CancellationToken.None))
Utilities\SpellChecker.cs (1)
60Logger.Log(FunctionId.SpellChecker_ExceptionInCacheRead);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
324Logger.Log(FunctionId.Workspace_Project_CompilationThrownAway, KeyValueLogMessage.Create(m =>
Workspace\Solution\Document.cs (1)
463using (Logger.LogBlock(FunctionId.Workspace_Document_GetTextChanges, this.Name, cancellationToken))
Workspace\Solution\DocumentState.cs (4)
136using (Logger.LogBlock(FunctionId.Workspace_Document_State_FullyParseSyntaxTree, s_fullParseLog, filePath, mode, cancellationToken)) 152using (Logger.LogBlock(FunctionId.Workspace_Document_State_FullyParseSyntaxTree, s_fullParseLog, filePath, mode, cancellationToken)) 198using (Logger.LogBlock(FunctionId.Workspace_Document_State_IncrementallyParseSyntaxTree, cancellationToken)) 220using (Logger.LogBlock(FunctionId.Workspace_Document_State_IncrementallyParseSyntaxTree, cancellationToken))
Workspace\Solution\FileTextLoader.cs (1)
245Logger.Log(FunctionId.FileTextLoader_FileLengthThresholdExceeded, KeyValueLogMessage.Create(static (m, args) =>
Workspace\Solution\ProjectState_Checksum.cs (1)
45using (Logger.LogBlock(FunctionId.ProjectState_ComputeChecksumsAsync, FilePath, cancellationToken))
Workspace\Solution\SolutionCompilationState.cs (1)
1307using (Logger.LogBlock(FunctionId.Workspace_SkeletonAssembly_GetMetadataOnlyImage, cancellationToken))
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
248using (Logger.LogBlock(FunctionId.Workspace_Project_CompilationTracker_BuildCompilationAsync,
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (2)
243using (Logger.LogBlock(FunctionId.Workspace_SkeletonAssembly_EmitMetadataOnlyImage, cancellationToken)) 279Logger.Log(FunctionId.MetadataOnlyImage_EmitFailure, KeyValueLogMessage.Create(static (m, emitResult) =>
Workspace\Solution\SolutionCompilationState_Checksum.cs (1)
108using (Logger.LogBlock(FunctionId.SolutionCompilationState_ComputeChecksumsAsync, this.SolutionState.FilePath, cancellationToken))
Workspace\Solution\SolutionState_Checksum.cs (1)
103using (Logger.LogBlock(FunctionId.SolutionState_ComputeChecksumsAsync, this.FilePath, cancellationToken))
Workspace\Solution\TextDocumentState_Checksum.cs (1)
37using (Logger.LogBlock(FunctionId.DocumentState_ComputeChecksumsAsync, FilePath, cancellationToken))
Workspace\Solution\VersionSource\RecoverableTextAndVersion.cs (2)
175using (Logger.LogBlock(FunctionId.Workspace_Recoverable_RecoverTextAsync, cancellationToken)) 185using (Logger.LogBlock(FunctionId.Workspace_Recoverable_RecoverText, cancellationToken))
Workspace\Workspace.cs (3)
1558using (Logger.LogBlock(FunctionId.Workspace_ApplyChanges, CancellationToken.None)) 1563Logger.Log(FunctionId.Workspace_ApplyChanges, "Apply Failed: workspaces do not match"); 1573FunctionId.Workspace_ApplyChanges,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Logging\TestTelemetryLogger.cs (1)
37public override bool IsEnabled(FunctionId functionId)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
FunctionIdTests.cs (7)
17var map = new Dictionary<FunctionId, string>(); 18foreach (var name in Enum.GetNames(typeof(FunctionId))) 20var value = (FunctionId)Enum.Parse(typeof(FunctionId), name); 23Assert.True(false, $"'{nameof(FunctionId)}.{name}' cannot have the same value as '{nameof(FunctionId)}.{existingName}'");
Microsoft.VisualStudio.LanguageServices (114)
CodeLens\RemoteCodeLensReferencesService.cs (4)
44using (Logger.LogBlock(FunctionId.CodeLens_GetReferenceCountAsync, cancellationToken)) 69using (Logger.LogBlock(FunctionId.CodeLens_FindReferenceLocationsAsync, cancellationToken)) 90using (Logger.LogBlock(FunctionId.CodeLens_FindReferenceMethodsAsync, cancellationToken)) 115using (Logger.LogBlock(FunctionId.CodeLens_GetFullyQualifiedName, cancellationToken))
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
70Logger.Log(FunctionId.DiagnosticAnalyzerService_Analyzers, KeyValueLogMessage.Create(
DocumentOutline\DocumentOutlineView.xaml.cs (3)
214SortOption.Name => FunctionId.DocumentOutline_SortByName, 215SortOption.Location => FunctionId.DocumentOutline_SortByOrder, 216SortOption.Type => FunctionId.DocumentOutline_SortByType,
ErrorReporting\VisualStudioErrorReportingService.cs (1)
52Logger.Log(FunctionId.VS_ErrorReportingService_ShowGlobalErrorInfo, KeyValueLogMessage.Create(LogType.UserAction, static (m, args) =>
Implementation\AbstractVsTextViewFilter.cs (1)
75using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_GetDataTipText, CancellationToken.None))
InheritanceMargin\InheritanceMarginLogger.cs (3)
25=> Logger.Log(FunctionId.InheritanceMargin_TargetsMenuOpen, KeyValueLogMessage.Create(LogType.UserAction)); 28=> Logger.Log(FunctionId.InheritanceMargin_NavigateToTarget, KeyValueLogMessage.Create(LogType.UserAction)); 32Logger.Log(FunctionId.InheritanceMargin_GetInheritanceMemberItems,
Interactive\VsInteractiveWindowProvider.cs (1)
69protected abstract FunctionId InteractiveWindowFunctionId { get; }
KeybindingReset\KeybindingsResetLogger.cs (1)
15Logger.Log(FunctionId.Experiment_KeybindingsReset, KeyValueLogMessage.Create(LogType.UserAction, static (m, action) =>
LanguageService\AbstractLanguageService`2.VsCodeWindowManager.cs (1)
273Logger.Log(FunctionId.DocumentOutline_WindowOpen, logLevel: LogLevel.Information);
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (4)
83using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_GetNameOfLocation, CancellationToken.None)) 127using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_GetProximityExpressions, CancellationToken.None)) 187using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_ResolveName, CancellationToken.None)) 243using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_ValidateBreakpointLocation, CancellationToken.None))
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
162Logger.Log(FunctionId.Run_Environment, KeyValueLogMessage.Create(
PullMemberUp\WarningDialog\PullMemberUpWarningDialog.xaml.cs (2)
29Logger.Log(FunctionId.PullMembersUpWarning_UserProceedToFinish); 35Logger.Log(FunctionId.PullMembersUpWarning_UserGoBack);
PullMemberUp\WarningDialog\PullMemberUpWarningViewModel.cs (3)
28Logger.Log(FunctionId.PullMembersUpWarning_ChangeTargetToAbstract); 36Logger.Log(FunctionId.PullMembersUpWarning_ChangeOriginToPublic); 42Logger.Log(FunctionId.PullMembersUpWarning_ChangeOriginToNonStatic);
RoslynActivityLogger.cs (4)
58public bool IsEnabled(FunctionId functionId) 64public void Log(FunctionId functionId, LogMessage logMessage) 67public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 70public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)
Snippets\SnippetExpansionClient.cs (2)
977Logger.Log(FunctionId.Snippet_OnAfterInsertion); 984Logger.Log(FunctionId.Snippet_OnBeforeInsertion);
StackTraceExplorer\StackTraceExplorerCommandHandler.cs (1)
68Logger.Log(FunctionId.StackTraceToolWindow_ShowOnActivated, logLevel: LogLevel.Information);
Telemetry\CodeMarkerLogger.cs (34)
18private static readonly Dictionary<FunctionId, List<Tuple<CodeMarkerId, CodeMarkerId>>> s_blockMap 19= new Dictionary<FunctionId, List<Tuple<CodeMarkerId, CodeMarkerId>>>() 21{ FunctionId.NavigateTo_Search, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 27{ FunctionId.Rename_InlineSession, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 32{ FunctionId.Rename_FindLinkedSpans, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 37{ FunctionId.WinformDesigner_GenerateXML, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 42{ FunctionId.BackgroundCompiler_BuildCompilationsAsync, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 48{ FunctionId.FindReference, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 53{ FunctionId.SmartTags_SmartTagInitializeFixes, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 58{ FunctionId.SmartTags_ApplyQuickFix, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 64{ FunctionId.LineCommit_CommitRegion, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 69{ FunctionId.Tagger_Outlining_TagProducer_ProduceTags, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 74{ FunctionId.Tagger_LineSeparator_TagProducer_ProduceTags, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 79{ FunctionId.NavigationBar_ComputeModelAsync, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 84{ FunctionId.Completion_ModelComputer_DoInBackground, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 90{ FunctionId.SignatureHelp_ModelComputation_UpdateModelInBackground, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 95{ FunctionId.Formatting_Format, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 100{ FunctionId.Formatting_ApplyResultToBuffer, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 105{ FunctionId.SmartTags_RefreshSession, new List<Tuple<CodeMarkerId, CodeMarkerId>>() 113private static readonly Dictionary<FunctionId, List<CodeMarkerId>> s_map 114= new Dictionary<FunctionId, List<CodeMarkerId>>() 116{ FunctionId.Rename_InlineSession, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBRenameSymbolEnd } }, 117{ FunctionId.BackgroundCompiler_BuildCompilationsAsync, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBCompilerReachedBoundState, CodeMarkerEvent.perfVBCompilerReachedCompiledState } }, 118{ FunctionId.Completion_ModelComputer_DoInBackground, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBIntelliXMLIndexingEnd } }, 119{ FunctionId.WorkCoordinator_AsyncWorkItemQueue_FirstItem, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBCompilerRegisterDesignViewAttributeBegin, CodeMarkerEvent.perfVBCompilerCommitBegin } }, 120{ FunctionId.WorkCoordinator_AsyncWorkItemQueue_LastItem, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBCompilerRegisterDesignViewAttributeEnd, CodeMarkerEvent.perfVBCompilerCommitEnd } }, 121{ FunctionId.Snippet_OnAfterInsertion, new List<CodeMarkerId>() { CodeMarkerEvent.perfVBInsertSnippetEnd } } 132public bool IsEnabled(FunctionId functionId) 135public void Log(FunctionId functionId, LogMessage logMessage) 138public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 141public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken) 147private static bool CanHandle(FunctionId functionId) 150private static void FireCodeMarkers<T>(Dictionary<FunctionId, List<T>> map, FunctionId functionId, Func<T, int> getter)
Telemetry\FileLogger.cs (8)
35private readonly AsyncBatchingWorkQueue<(FunctionId functionId, string message)> _workQueue; 64public bool IsEnabled(FunctionId functionId) 81private void Log(FunctionId functionId, string message) 84public void Log(FunctionId functionId, LogMessage logMessage) 87public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 90public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken) 93private void LogBlockEvent(FunctionId functionId, LogMessage logMessage, int uniquePairId, string blockEvent) 97ImmutableSegmentedList<(FunctionId functionId, string message)> list, CancellationToken cancellationToken)
Telemetry\Shared\AbstractAggregatingLog.cs (2)
29private readonly FunctionId _functionId; 39public AbstractAggregatingLog(TelemetrySession session, FunctionId functionId)
Telemetry\Shared\AggregatingCounterLog.cs (1)
19public AggregatingCounterLog(TelemetrySession session, FunctionId functionId) : base(session, functionId)
Telemetry\Shared\AggregatingHistogramLog.cs (1)
29public AggregatingHistogramLog(TelemetrySession session, FunctionId functionId, double[]? bucketBoundaries) : base(session, functionId)
Telemetry\Shared\TelemetryLogger.cs (13)
42public override bool IsEnabled(FunctionId functionId) 82private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 83private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = []; 87internal static string GetEventName(FunctionId id) 90internal static string GetPropertyName(FunctionId id, string name) 93private static string GetTelemetryName(FunctionId id, char separator) 94=> Enum.GetName(typeof(FunctionId), id)!.Replace('_', separator).ToLowerInvariant(); 99public abstract bool IsEnabled(FunctionId functionId); 105public void Log(FunctionId functionId, LogMessage logMessage) 124public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int blockId, CancellationToken cancellationToken) 143public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int blockId, int delta, CancellationToken cancellationToken) 178private static void SetProperties(TelemetryEvent telemetryEvent, FunctionId functionId, LogMessage logMessage, int? delta = null) 201private static void AppendProperties(TelemetryEvent telemetryEvent, FunctionId functionId, KeyValueLogMessage logMessage)
Telemetry\Shared\TelemetryLogProvider.cs (12)
21/// Manages instances of <see cref="VisualStudioTelemetryLog"/> to provide in <see cref="GetLog(FunctionId)"/> 23private ImmutableDictionary<FunctionId, VisualStudioTelemetryLog> _logs = ImmutableDictionary<FunctionId, VisualStudioTelemetryLog>.Empty; 26/// Manages instances of <see cref="AggregatingHistogramLog"/> to provide in <see cref="GetHistogramLog(FunctionId, double[])"/> 28private ImmutableDictionary<FunctionId, AggregatingHistogramLog> _histogramLogs = ImmutableDictionary<FunctionId, AggregatingHistogramLog>.Empty; 31/// Manages instances of <see cref="AggregatingCounterLog"/> to provide in <see cref="GetCounterLog(FunctionId)"/> 33private ImmutableDictionary<FunctionId, AggregatingCounterLog> _counterLogs = ImmutableDictionary<FunctionId, AggregatingCounterLog>.Empty; 53public ITelemetryBlockLog? GetLog(FunctionId functionId) 64public ITelemetryBlockLog? GetHistogramLog(FunctionId functionId, double[]? bucketBoundaries) 76public ITelemetryLog? GetCounterLog(FunctionId functionId)
Telemetry\Shared\VisualStudioTelemetryLog.cs (2)
14private readonly FunctionId _functionId; 16public VisualStudioTelemetryLog(ILogger telemetryLogger, FunctionId functionId)
UnusedReferences\UnusedReferenceAnalysisService.cs (1)
28using var logger = Logger.LogBlock(FunctionId.UnusedReferences_GetUnusedReferences, message: null, cancellationToken, LogLevel.Information);
ValueTracking\ValueTrackingCommandHandler.cs (1)
82using var logger = Logger.LogBlock(FunctionId.ValueTracking_Command, CancellationToken.None, LogLevel.Information);
Watson\FaultReporter.cs (1)
139eventName: TelemetryLogger.GetEventName(FunctionId.NonFatalWatson),
Workspace\VisualStudioDocumentNavigationService.cs (1)
378using (Logger.LogBlock(FunctionId.NavigationService_VSDocumentNavigationService_NavigateTo, cancellationToken))
Workspace\VisualStudioSourceGeneratorTelemetryCollectorWorkspaceServiceFactory.cs (2)
85_otherWorkspacesInstance.ReportStatisticsAndClear(FunctionId.SourceGenerator_OtherWorkspaceSessionStatistics); 101_visualStudioWorkspaceInstance.ReportStatisticsAndClear(FunctionId.SourceGenerator_SolutionStatistics);
Workspace\VisualStudioWorkspaceStatusServiceFactory.cs (2)
111using (Logger.LogBlock(FunctionId.PartialLoad_FullyLoaded, KeyValueLogMessage.NoProperty, cancellationToken)) 120Logger.Log(FunctionId.PartialLoad_FullyLoaded, KeyValueLogMessage.Create(
Microsoft.VisualStudio.LanguageServices.CSharp (3)
Interactive\CSharpVsInteractiveWindowProvider.cs (2)
58protected override FunctionId InteractiveWindowFunctionId => FunctionId.CSharp_Interactive_Window;
SemanticSearch\SemanticSearchQueryExecutor.cs (1)
136Logger.Log(FunctionId.SemanticSearch_QueryExecution, KeyValueLogMessage.Create(map =>
Microsoft.VisualStudio.LanguageServices.DevKit (31)
src\VisualStudio\Core\Def\Telemetry\Shared\AbstractAggregatingLog.cs (2)
29private readonly FunctionId _functionId; 39public AbstractAggregatingLog(TelemetrySession session, FunctionId functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\AggregatingCounterLog.cs (1)
19public AggregatingCounterLog(TelemetrySession session, FunctionId functionId) : base(session, functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\AggregatingHistogramLog.cs (1)
29public AggregatingHistogramLog(TelemetrySession session, FunctionId functionId, double[]? bucketBoundaries) : base(session, functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogger.cs (13)
42public override bool IsEnabled(FunctionId functionId) 82private static readonly ConcurrentDictionary<FunctionId, string> s_eventMap = []; 83private static readonly ConcurrentDictionary<(FunctionId id, string name), string> s_propertyMap = []; 87internal static string GetEventName(FunctionId id) 90internal static string GetPropertyName(FunctionId id, string name) 93private static string GetTelemetryName(FunctionId id, char separator) 94=> Enum.GetName(typeof(FunctionId), id)!.Replace('_', separator).ToLowerInvariant(); 99public abstract bool IsEnabled(FunctionId functionId); 105public void Log(FunctionId functionId, LogMessage logMessage) 124public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int blockId, CancellationToken cancellationToken) 143public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int blockId, int delta, CancellationToken cancellationToken) 178private static void SetProperties(TelemetryEvent telemetryEvent, FunctionId functionId, LogMessage logMessage, int? delta = null) 201private static void AppendProperties(TelemetryEvent telemetryEvent, FunctionId functionId, KeyValueLogMessage logMessage)
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogProvider.cs (12)
21/// Manages instances of <see cref="VisualStudioTelemetryLog"/> to provide in <see cref="GetLog(FunctionId)"/> 23private ImmutableDictionary<FunctionId, VisualStudioTelemetryLog> _logs = ImmutableDictionary<FunctionId, VisualStudioTelemetryLog>.Empty; 26/// Manages instances of <see cref="AggregatingHistogramLog"/> to provide in <see cref="GetHistogramLog(FunctionId, double[])"/> 28private ImmutableDictionary<FunctionId, AggregatingHistogramLog> _histogramLogs = ImmutableDictionary<FunctionId, AggregatingHistogramLog>.Empty; 31/// Manages instances of <see cref="AggregatingCounterLog"/> to provide in <see cref="GetCounterLog(FunctionId)"/> 33private ImmutableDictionary<FunctionId, AggregatingCounterLog> _counterLogs = ImmutableDictionary<FunctionId, AggregatingCounterLog>.Empty; 53public ITelemetryBlockLog? GetLog(FunctionId functionId) 64public ITelemetryBlockLog? GetHistogramLog(FunctionId functionId, double[]? bucketBoundaries) 76public ITelemetryLog? GetCounterLog(FunctionId functionId)
src\VisualStudio\Core\Def\Telemetry\Shared\VisualStudioTelemetryLog.cs (2)
14private readonly FunctionId _functionId; 16public VisualStudioTelemetryLog(ILogger telemetryLogger, FunctionId functionId)
Roslyn.VisualStudio.DiagnosticsWindow (14)
Loggers\OutputWindowLogger.cs (6)
23private readonly Func<FunctionId, bool> _isEnabledPredicate; 25public OutputWindowLogger(Func<FunctionId, bool> isEnabledPredicate) 30public bool IsEnabled(FunctionId functionId) 33public void Log(FunctionId functionId, LogMessage logMessage) 38public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 43public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)
OptionPages\PerformanceLoggersPage.cs (1)
70var functionIds = Enum.GetValues<FunctionId>().Where(isEnabled).ToImmutableArray();
PerfMargin\DataModel.cs (3)
21var fields = from field in typeof(FunctionId).GetFields() 51public void BlockStart(FunctionId functionId) 54public void BlockDisposed(FunctionId functionId)
PerfMargin\PerfEventActivityLogger.cs (4)
23public bool IsEnabled(FunctionId functionId) 28public void Log(FunctionId functionId, LogMessage logMessage) 33public void LogBlockStart(FunctionId functionId, LogMessage logMessage, int uniquePairId, CancellationToken cancellationToken) 38public void LogBlockEnd(FunctionId functionId, LogMessage logMessage, int uniquePairId, int delta, CancellationToken cancellationToken)