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

Tracer.addSpanLink should take two contexts #28953

Closed
lmolkova opened this issue May 19, 2022 · 1 comment
Closed

Tracer.addSpanLink should take two contexts #28953

lmolkova opened this issue May 19, 2022 · 1 comment
Assignees
Labels
Azure.Core.V2 Contains issues to consider when desiging Azure Core V2 Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. OpenTelemetry OpenTelemetry instrumentation

Comments

@lmolkova
Copy link
Member

// TODO (lmolkova) we need better addSpanLinks(Context shared, Context link)
Object eventSpanContext = event.getContext().getData(SPAN_CONTEXT_KEY).orElse(Context.NONE);
tracerProvider.addSpanLinks(sharedContext.addData(SPAN_CONTEXT_KEY, eventSpanContext));

When we add a link to the span, we have two independent contexts:

  • shared context to start Send or Process span
  • individual message contexts

Currently, we have to merge two contexts, but it's not efficient and not correct.
We need an api on tracer that would take two Contexts like addSpanLink(Context shared, Context link)

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 19, 2022
@lmolkova lmolkova self-assigned this May 19, 2022
@lmolkova lmolkova added Azure.Core azure-core Azure.Core.V2 Contains issues to consider when desiging Azure Core V2 OpenTelemetry OpenTelemetry instrumentation labels May 19, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 19, 2022
@lmolkova lmolkova added the Client This issue points to a problem in the data-plane of the library. label May 19, 2022
@lmolkova
Copy link
Member Author

Required for #30557

@lmolkova lmolkova closed this as completed Feb 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core.V2 Contains issues to consider when desiging Azure Core V2 Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. OpenTelemetry OpenTelemetry instrumentation
Projects
Status: Done
Development

No branches or pull requests

1 participant