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

[API Proposal]: Allow adding links after activity creation #101146

Closed
lmolkova opened this issue Apr 16, 2024 · 2 comments
Closed

[API Proposal]: Allow adding links after activity creation #101146

lmolkova opened this issue Apr 16, 2024 · 2 comments
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Diagnostics.Tracing

Comments

@lmolkova
Copy link

lmolkova commented Apr 16, 2024

Background and motivation

OpenTelemetry recently added and stabilized adding links after span creation.

See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#link for the details.

This is useful:

API Proposal

Add Activity.AddLink(ActivityLink link) API

API Usage

using var activity = Source.StartActivity("Receive");

var messages = await ReceiveInternal(maxBtchSize);
foreach (var ctx in ExtractTraceContext(messages))
{
    activity.AddLink(new ActivityLink(ctx)); // this is new
}

Alternative Designs

No response

Risks

No response

@lmolkova lmolkova added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Apr 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 16, 2024
Copy link
Contributor

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
See info in area-owners.md if you want to be subscribed.

@tarekgh
Copy link
Member

tarekgh commented Apr 16, 2024

Duplicate of #97680

@tarekgh tarekgh marked this as a duplicate of #97680 Apr 16, 2024
@tarekgh tarekgh closed this as completed Apr 16, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Apr 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Diagnostics.Tracing
Projects
None yet
Development

No branches or pull requests

2 participants