[[["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\u003eClientIpLogEntryLabelProvider\u003c/code\u003e is a class that implements \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e to add the client's IP address to log entry labels.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eHttpLogEntryLabelProvider\u003c/code\u003e and provides functionality to augment log entry labels with client IP information.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eClientIpLogEntryLabelProvider\u003c/code\u003e class is initialized with an \u003ccode\u003eIHttpContextAccessor\u003c/code\u003e to access the \u003ccode\u003eHttpContext\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eInvokeCore\u003c/code\u003e method, which overrides \u003ccode\u003eHttpLogEntryLabelProvider.InvokeCore\u003c/code\u003e, is used to implement the core logic of the \u003ccode\u003eILogEntryLabelProvider\u003c/code\u003e using the \u003ccode\u003eHttpContext\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class is located in the \u003ccode\u003eGoogle.Cloud.Diagnostics.AspNetCore\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Cloud.Diagnostics.AspNetCore.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Class ClientIpLogEntryLabelProvider (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.ClientIpLogEntryLabelProvider)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/4.3.1/Google.Cloud.Diagnostics.AspNetCore.ClientIpLogEntryLabelProvider) \n\n public class ClientIpLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProvider\n\nA [ILogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ILogEntryLabelProvider) implementation which adds the client's IP-address 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 ClientIpLogEntryLabelProvider \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### ClientIpLogEntryLabelProvider(IHttpContextAccessor)\n\n public ClientIpLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)\n\nInitializes a new instance of the [ClientIpLogEntryLabelProvider](/dotnet/docs/reference/Google.Cloud.Diagnostics.AspNetCore/latest/Google.Cloud.Diagnostics.AspNetCore.ClientIpLogEntryLabelProvider) 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_)"]]