Add links after activity (span) creation #5273
Labels
enhancement
New feature or request
needs-runtime-change
Issues which likely require changes from dotnet runtime - typically DiagnosticSource package
traces
Tracing signal related
Milestone
Feature Request
A recent experimental addition to the OTel specification introduces a new required
AddLink
operation on spans, which allows adding span links after a span was created.This addition is expected to be declared stable soon (@carlosalberto is driving this), there already exist prototypes for C++, Java, and Python. Messaging semantic conventions, which aim at stabilization this year, require this feature.
It should be decided how to make this feature available for .NET users.
Is your feature request related to a problem?
As soon as this feature is declared stable, OTel .NET will need to implement it in order to conform to the specification.
Describe the solution you'd like:
Ideally, there would be an
Activity.AddLink
method, similar toActivity.AddEvent
orActivity.AddTag
.Describe alternatives you've considered.
A workaround would be to create a dedicated child span for each link to be added after a span was created. This is cumbersome, as it will drastically increase the number of spans in some cases and obfuscate resulting traces.
The text was updated successfully, but these errors were encountered: