Open Nikey646 opened 5 years ago
Handlers could be globally configured via IHttpMessageHandlerBuilderFilter
for anyone searching until its in the box you can use this
public class RinHttpHandler : DelegatingHandler
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
using var scope = TimelineScope.Create("Http", TimelineEventCategory.Data, request.RequestUri?.AbsoluteUri);
try
{
return await base.SendAsync(request, cancellationToken);
}
finally
{
scope.Complete();
}
}
}
It would be nice to be able to track requests made by a HttpClient as well.
This could be implemented via an DelegatingHandler.