Open vishweshbankwar opened 1 year ago
I've created a request here for this.
Need to create issue for HttpClient as well.
IIRC, one of the reason why this was not done was because ActivityTagsCollection
is heap allocated and hence we avoided its usage until after sampling decision is made. It might be possible to leverage TagList
for this purpose, with some support from Activity class itself in runtime.
We do this in SqlClient without alloc (because it was feasible). See https://github.com/open-telemetry/opentelemetry-dotnet/issues/1971#issuecomment-816877268 too
the idea I had was to make it more of an extension, in the case that .NET didn't want to add the extra bits then it can become something that OpenTelemetry does.
Providing that extension point would be useful I think.
Feature Request
Spec requires client and server spans to provide certain attributes(for client and for server) during sampling so that the information can be used to make sampling decisions. In .NET this is currently not possible to do at the instrumentation library level, as the spans are created by the HttpClient and ASP.NET Core libraries itself. To support this requirement, the change need to be done on the libraries side.
Opening this issue for reference.