public class TraceIdLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProviderA ILogEntryLabelProvider implementation which adds the Microsoft.AspNetCore.Http.HttpContext.TraceIdentifier to the log entry labels.
Namespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Constructors
TraceIdLogEntryLabelProvider(IHttpContextAccessor)
public TraceIdLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)Initializes a new instance of the TraceIdLogEntryLabelProvider 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. |