Skip to content

[feature request] Add support to 'add links' to TelemetrySpan as it was added to Activity in .net9 #6042

@ailn

Description

@ailn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions