Google.Cloud.Diagnostics.AspNetCore3 - Class HttpLogEntryLabelProvider (5.1.0)

public abstract class HttpLogEntryLabelProvider : ILogEntryLabelProvider

Reference documentation and code samples for the Google.Cloud.Diagnostics.AspNetCore3 class HttpLogEntryLabelProvider.

Base class for ILogEntryLabelProvider implementations which needs an HttpContext instance.

Inheritance

object > HttpLogEntryLabelProvider

Namespace

GoogleCloudGoogle.Cloud.DiagnosticsAspNetCore3

Assembly

Google.Cloud.Diagnostics.AspNetCore3.dll

Constructors

HttpLogEntryLabelProvider(IHttpContextAccessor)

protected HttpLogEntryLabelProvider(IHttpContextAccessor httpContextAccessor)

Initializes the HttpLogEntryLabelProvider base class.

Parameter
NameDescription
httpContextAccessorIHttpContextAccessor

The IHttpContextAccessor instance with the HttpContext.

Methods

Invoke(Dictionary<string, string>)

public void Invoke(Dictionary<string, string> labels)
Parameter
NameDescription
labelsDictionarystringstring

InvokeCore(Dictionary<string, string>, HttpContext)

protected abstract 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
labelsDictionarystringstring

The log entry labels to augment.

httpContextHttpContext

The HttpContext instance.