I am using MiniProfiler to monitor request to external APIs using CustomTiming
s :
var externalApiClient = new ExternalApiClient();
using(MiniProfiler.Current.CustomTiming("ExternalAPI","ExternalAPI.Method"))
{
externalApiClient.Method();
}
This works well, but I would like to add more data like status codes, result counts... I haven't found anything built-in that would allow me to do this.
Have I missed something? What would be the best way? I could create a new class inheriting from CustomTiming
, but looking at the code, I fear this would not be reliable in the long run (with things like [DataMember(Order = 8)]
).