What is the difference between AddHttpClientInstrumentation and AddAspNetCoreInstrumentation
In Asp.net core, to provide auto trace instrumentation, we can do the followings.
services.AddOpenTelemetryTracing(providerBuilder =>
{
providerBuilder
.AddSource("TemenosInsightDataService")
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("InsightDataService"))
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation()
.AddSqlClientInstrumentation()
.AddConsoleExporter()
});
After reading the limited documentation on github, I still quite understand the purpose and difference between them. It seems to me their main purpose is to allow Enrich function to be called to add additional information to activity. I can do that on both AddHttpClientInstrumentation() and AddAspNetCoreInstrumentation() which will both add to trace context. How to choose which one to use?