Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links after activity (span) creation #5273

Closed
pyohannes opened this issue Jan 29, 2024 · 4 comments · Fixed by #5972
Closed

Add links after activity (span) creation #5273

pyohannes opened this issue Jan 29, 2024 · 4 comments · Fixed by #5972
Assignees
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

Comments

@pyohannes
Copy link
Contributor

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 to Activity.AddEvent or Activity.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.

@pyohannes pyohannes added the enhancement New feature or request label Jan 29, 2024
@cijothomas cijothomas added the needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package label Jan 29, 2024
@cijothomas
Copy link
Member

Thanks @pyohannes for raising this. The actual change needs to be done in the .NET runtime repo.

@vishweshbankwar This needs to have a corresponding issue in Runtime repo for consideration in .NET 9 timeframe. Could you open that, and link back here?

@vishweshbankwar
Copy link
Member

dotnet/runtime#97680

@cijothomas
Copy link
Member

Added to 1.10 milestone, as that aligns with .NET 9 release, which already has added support for AddLink. There is probably nothing to be done in this repo except docs/tests maybe, as Links are stored inside Activity.

@CodeBlanch CodeBlanch added the traces Tracing signal related label Jun 18, 2024
@cijothomas cijothomas self-assigned this Sep 16, 2024
@cijothomas
Copy link
Member

I'll check if there is anything required here in next 1-2 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-runtime-change Issues which likely require changes from dotnet runtime - typically DiagnosticSource package traces Tracing signal related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants