[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eUserLogEntryLabelProvider\u003c/code\u003e is a class that extends \u003ccode\u003eHttpLogEntryLabelProvider\u003c/code\u003e and implements \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e, enabling the addition of authenticated user information to log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes the \u003ccode\u003eIHttpContextAccessor\u003c/code\u003e to access the \u003ccode\u003eHttpContext\u003c/code\u003e and add information about the authenticated user.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInvokeCore\u003c/code\u003e method, which is overriden from the base class, takes a dictionary of string key/value pairs to represent labels, and an \u003ccode\u003eHttpContext\u003c/code\u003e instance, allowing for augmentation of log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eThis class is found within the \u003ccode\u003eGoogle.Cloud.Diagnostics.AspNetCore\u003c/code\u003e namespace and is part of the \u003ccode\u003eGoogle.Cloud.Diagnostics.AspNetCore.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eA new instance of \u003ccode\u003eUserLogEntryLabelProvider\u003c/code\u003e can be initialized by providing an \u003ccode\u003eIHttpContextAccessor\u003c/code\u003e instance.\u003c/p\u003e\n"]]],[],null,["# Class UserLogEntryLabelProvider (4.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.UserLogEntryLabelProvider)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/4.3.1/Google.Cloud.Diagnostics.AspNetCore.UserLogEntryLabelProvider) \n\n public class UserLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProvider\n\nA [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) which adds the information of the authenticated user to the log entry labels. \n\nInheritance\n-----------\n\n[Object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e [HttpLogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.HttpLogEntryLabelProvider) \\\u003e UserLogEntryLabelProvider \n\nImplements\n----------\n\n[ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider), [ILogEntryLabelProvider](https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ILogEntryLabelProvider.html) \n\nInherited Members\n-----------------\n\n[HttpLogEntryLabelProvider.Invoke(Dictionary\\\u003cString, String\\\u003e)](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.HttpLogEntryLabelProvider#Google_Cloud_Diagnostics_AspNetCore_HttpLogEntryLabelProvider_Invoke_System_Collections_Generic_Dictionary_System_String_System_String__) \n[Object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode#system-object-gethashcode) \n[Object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype#system-object-gettype) \n[Object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone#system-object-memberwiseclone) \n[Object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring#system-object-tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Diagnostics.AspNetCore](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore)\n\nAssembly\n--------\n\nGoogle.Cloud.Diagnostics.AspNetCore.dll\n\nConstructors\n------------\n\n### UserLogEntryLabelProvider(IHttpContextAccessor)\n\n public UserLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)\n\nInitializes a new instance of the [UserLogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.UserLogEntryLabelProvider) class.\n\nMethods\n-------\n\n### InvokeCore(Dictionary\\\u003cString, String\\\u003e, HttpContext)\n\n protected override void InvokeCore(Dictionary\u003cstring, string\u003e labels, HttpContext httpContext)\n\nIn a derived class, invokes the core logic of the [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) using the [HttpContext](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.http.httpcontext) instance.\n\n**Overrides** \n[HttpLogEntryLabelProvider.InvokeCore(Dictionary\\\u003cString, String\\\u003e, HttpContext)](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.HttpLogEntryLabelProvider#Google_Cloud_Diagnostics_AspNetCore_HttpLogEntryLabelProvider_InvokeCore_System_Collections_Generic_Dictionary_System_String_System_String__Microsoft_AspNetCore_Http_HttpContext_)"]]