[feature request] Add support to 'add links' to TelemetrySpan as it was added to Activity in .net9 #6042
Labels
enhancement
New feature or request
good first issue
Good for newcomers
pkg:OpenTelemetry.Api
Issues related to OpenTelemetry.Api NuGet package
Milestone
Package
OpenTelemetry
Is your feature request related to a problem?
I want to be able to add span links to already created spans. This ability was recently added to System.Diagnostics.Activity (see AddLinks method)
What is the expected behavior?
Add 'AddLinks' method to TelemetrySpan
Which alternative solutions or features have you considered?
Right now I use a Activity directly, but would like to use the shim
E.g.
// todo: replace with shim implementation as soon as AddLink is available
Activity currentActivity = Activity.Current!;
currentActivity.AddLink(new ActivityLink(span.Context));
Additional context
No response
The text was updated successfully, but these errors were encountered: