Skip to content

Support adding links to Activity after it is created #97680

Closed
@vishweshbankwar

Description

@vishweshbankwar

OpenTelemetry has added spec for supporting link addition to spans after the span is created. PR marking spec as stable - open-telemetry/opentelemetry-specification#3887.

This is currently not possible in .NET. Links can only be added when the activity is being created see this

Opening the issue for tracking as supporting this new feature would require addition of new API in System.Diagnostics.DiagnosticSource.

API Proposal

namespace System.Diagnostics
{
    public partial class Activity : IDisposable
    {
        public System.Diagnostics.Activity AddLink(System.Diagnostics.ActivityLink link);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-approvedAPI was approved in API review, it can be implementedarea-System.Diagnostics.Activityin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions