Class TraceIdLogEntryLabelProvider (4.4.0)

public class TraceIdLogEntryLabelProvider : HttpLogEntryLabelProvider, ILogEntryLabelProvider, ILogEntryLabelProvider

A ILogEntryLabelProvider implementation which adds the TraceIdentifier to the log entry labels.

Inheritance

Object > HttpLogEntryLabelProvider > TraceIdLogEntryLabelProvider

Namespace

Google.Cloud.Diagnostics.AspNetCore3

Assembly

Google.Cloud.Diagnostics.AspNetCore3.dll

Constructors

TraceIdLogEntryLabelProvider(IHttpContextAccessor)

public TraceIdLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)

Initializes a new instance of the TraceIdLogEntryLabelProvider class.

Parameter
NameDescription
httpContextAccessorIHttpContextAccessor

The IHttpContextAccessor instance with the 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 HttpContext instance.

Parameters
NameDescription
labelsDictionary<String, String>

The log entry labels to augment.

httpContextHttpContext

The HttpContext instance.

Overrides