-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Milestone
Description
We have this issue open in OpenTelemetry .NET: open-telemetry/opentelemetry-dotnet#3290
The spec says the SDK should always create a span / Activity (even when it isn't being sampled) but we don't currently do that because we feel like the GC pressure will be too high.
Opening this issue primarily because I don't think this has been tracked anywhere.
Random ideas...
- [API Proposal]: System.Diagnostics.ActivityContext.Current ability or similar #86966 has an idea to detach the context from the
Activity. I think the goal is different but perhaps something like that might help. - Perhaps we could move the data kept on
Activityto a sub-class which is only instantiated when needed to lower the footprint ofActivityitself. - Some kind of pooling? Tricky because an
Activityinstance may be kept around for a while before it is exported (batching).
cijothomas and splitt3r