[[["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\u003eThe \u003ccode\u003eTraceIdLogEntryLabelProvider\u003c/code\u003e class is an implementation of \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e designed to add the \u003ccode\u003eTraceIdentifier\u003c/code\u003e to log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003eHttpLogEntryLabelProvider\u003c/code\u003e and includes inherited members such as \u003ccode\u003eInvoke\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, \u003ccode\u003eMemberwiseClone\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTraceIdLogEntryLabelProvider\u003c/code\u003e class has a constructor that requires an \u003ccode\u003eIHttpContextAccessor\u003c/code\u003e to initialize.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInvokeCore\u003c/code\u003e method, which is overridden from \u003ccode\u003eHttpLogEntryLabelProvider\u003c/code\u003e, utilizes the \u003ccode\u003eHttpContext\u003c/code\u003e instance to augment the log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the provider is \u003ccode\u003e4.4.0\u003c/code\u003e however \u003ccode\u003e4.3.1\u003c/code\u003e is also available.\u003c/p\u003e\n"]]],[],null,["# Class TraceIdLogEntryLabelProvider (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.TraceIdLogEntryLabelProvider)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/4.3.1/Google.Cloud.Diagnostics.AspNetCore.TraceIdLogEntryLabelProvider) \n\n public class TraceIdLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProvider\n\nA [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) implementation which adds the [TraceIdentifier](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.http.httpcontext.traceidentifier#microsoft-aspnetcore-http-httpcontext-traceidentifier) 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 TraceIdLogEntryLabelProvider \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### TraceIdLogEntryLabelProvider(IHttpContextAccessor)\n\n public TraceIdLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)\n\nInitializes a new instance of the [TraceIdLogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.TraceIdLogEntryLabelProvider) 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_)"]]