Initialize(ICorrelationProtocol, Predicate<Uri>)
Instruments the PostSharp.Patterns.Diagnostics.Adapters.HttpClient class.
Declaration
public static IDisposable Initialize(ICorrelationProtocol correlationProtocol = null, Predicate<Uri> requestUriPredicate = null)
Parameters
Type | Name | Description |
---|---|---|
ICorrelationProtocol | correlationProtocol | An optional implementation of ICorrelationProtocol to support distributed logging and add relevant headers to outgoing requests. |
Predicate<Uri> | requestUriPredicate | A predicate that determines whether a given outgoing request should be captured. If null, all requests are captured. |
Returns
Type | Description |
---|---|
IDisposable | An opaque token to dispose when instrumentation is no longer needed. |
Remarks
It's the user's responsibility to call this method only once.