Open sandboxFocus

Class HttpClientLogging

Instruments the HttpClient class.

Inheritance
HttpClientLogging
Namespace: PostSharp.Patterns.Diagnostics.Adapters.HttpClient
Assembly: PostSharp.Patterns.Diagnostics.Adapters.HttpClient.dll
Syntax
public abstract class HttpClientLogging
Remarks

Call Initialize(ICorrelationProtocol, Predicate<Uri>) once when the application starts. The instrumentation then opens a logging activity for each outgoing HTTP request. For distributed logging, pass an ICorrelationProtocol such as LegacyHttpCorrelationProtocol: it adds correlation headers to outgoing requests. Use the same protocol in the instrumentation of the server.

Constructors

Name Description
HttpClientLogging()

Methods

Name Description
Initialize(ICorrelationProtocol, Predicate<Uri>)

Instruments the HttpClient class.

See Also