Initialize(ICorrelationProtocol, Predicate<Uri>)
Instruments the 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 |
Returns
| Type | Description |
|---|---|
| IDisposable | An opaque token to dispose when instrumentation is no longer needed. |
Remarks
It is the responsibility of the user to call this method only once.