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

[Design] Tracing story for LRO #10969

Closed
anuchandy opened this issue May 8, 2020 · 1 comment
Closed

[Design] Tracing story for LRO #10969

anuchandy opened this issue May 8, 2020 · 1 comment
Assignees
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. design-discussion An area of design currently under discussion and open to team and community feedback. OpenTelemetry OpenTelemetry instrumentation

Comments

@anuchandy
Copy link
Member

This work item is to explore various options for LRO tracing.

The LRO abstraction quick intro:

The client-side LRO abstraction PollerFlux is one type that composes almost 4 service calls:

  1. One time service call to start LRO
  2. Multiple service call to poll LRO
  3. Service call to retrieve the final result of LRO (if service support it)
  4. Service call to cancel the LRO (if service support it)

Problem:

We need to decide on how we want to report telemetry for these service calls from a single PollerFlux.

--> One option is to put all these logically associated API calls under one group.

Examples:

The following examples show a couple of usage of PollerFlux and how telemetry looks like with grouping option.

Example1:

Start LRO and do the polls

fooFlux.map(response -> {
    Logger.log(response.getStatus());
    return response;
}).block();

example1

Example2:

Start LRO, do the polls and fetch result.

fooFlux.flatmap(response -> {
    Logger.log(response.getStatus());
    if (response.getStatus() == LongRunningOperationStatus.SUCCEEDED)  {
    return response.getFinalResult();
} else {
    return Mono.empty();
}
}).block();

example2

Example3:

Start LRO, do the polls then cancel.

fooFlux.flatmap(response -> {
    Logger.log(response.getStatus());
    if (response.getStatus() == LongRunningOperationStatus.BLOCKED)  {
    return response.cancelOperation();
} else {
    return Mono.empty();
}
}).block();

example3

Example4:

Use the first subscription to Start LRO, do 2 polls

fooFlux.map(response -> {
    Logger.log(response.getStatus());
    return response;
}).take(2).block();

do subscription on the same poller flux instance for polling

fooFlux.map(response -> {
    Logger.log(response.getStatus());
    return response;
}).block();

Note one instance of PollerFlux makes an only single call to start LRO, so other subscription simply result in polling.

One way to show the telemetry is like below by grouping two subscription under the same parent span, if we decide this path then we could user parent PollerContext.

example4

To discuss:

Is the above-outlined grouping option make sense for LRO, what are the other alternatives.

\cc @alzimmermsft @JonathanGiles @srnagar @samvaity

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 8, 2020
@anuchandy anuchandy added Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. labels May 8, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 8, 2020
@alzimmermsft alzimmermsft added the design-discussion An area of design currently under discussion and open to team and community feedback. label Jul 15, 2020
@lmolkova lmolkova added the OpenTelemetry OpenTelemetry instrumentation label Jun 16, 2022
Copy link

Hi @anuchandy, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. design-discussion An area of design currently under discussion and open to team and community feedback. OpenTelemetry OpenTelemetry instrumentation
Projects
Status: Done
Development

No branches or pull requests

3 participants