public class ClientIpLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProviderA ILogEntryLabelProvider implementation which adds the client's IP-address to the log entry labels.
Namespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Constructors
ClientIpLogEntryLabelProvider(IHttpContextAccessor)
public ClientIpLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)Initializes a new instance of the ClientIpLogEntryLabelProvider class.
| Parameter | |
|---|---|
| Name | Description |
httpContextAccessor |
Microsoft.AspNetCore.Http.IHttpContextAccessorThe Microsoft.AspNetCore.Http.IHttpContextAccessor instance with the Microsoft.AspNetCore.Http.HttpContext. |
Methods
InvokeCore(Dictionary<String, String>, HttpContext)
protected override void InvokeCore(Dictionary<string, string> labels, HttpContext httpContext)In a derived class, invokes the core logic of the ILogEntryLabelProvider using the Microsoft.AspNetCore.Http.HttpContext instance.
| Parameters | |
|---|---|
| Name | Description |
labels |
System.Collections.Generic.Dictionary<System.String, System.String>The log entry labels to augment. |
httpContext |
Microsoft.AspNetCore.Http.HttpContextThe Microsoft.AspNetCore.Http.HttpContext instance. |