Skip to content

Commit 7bf3f06

Browse files
torosentCopilot
andcommitted
feat(tracing): add sub-orchestration to sample and update screenshots
- Add 'Summarize' sub-orchestration to TracingPattern sample that calls CreateSummary activity, demonstrating sub-orchestration span nesting - Update TracingChain Azure Functions sample to match - Update Jaeger screenshots showing 17 spans at Depth 6 with proper sub-orchestration hierarchy Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f2a2bc7 commit 7bf3f06

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed
10.3 KB
Loading
10.8 KB
Loading
37.3 KB
Loading

samples/src/main/java/io/durabletask/samples/TracingPattern.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,28 @@ public TaskOrchestration create() {
9999
// Fan-in: wait for all activities to complete
100100
List<String> results = ctx.allOf(parallelTasks).await();
101101

102-
// Aggregate results
103-
String summary = ctx.callActivity(
104-
"CreateSummary", String.join(", ", results), String.class).await();
102+
// Sub-orchestration: aggregate results (demonstrates sub-orch span)
103+
String summary = ctx.callSubOrchestrator(
104+
"Summarize", String.join(", ", results), String.class).await();
105105

106106
ctx.complete(summary);
107107
};
108108
}
109109
})
110+
.addOrchestration(new TaskOrchestrationFactory() {
111+
@Override
112+
public String getName() { return "Summarize"; }
113+
114+
@Override
115+
public TaskOrchestration create() {
116+
return ctx -> {
117+
String input = ctx.getInput(String.class);
118+
String result = ctx.callActivity(
119+
"CreateSummary", input, String.class).await();
120+
ctx.complete(result);
121+
};
122+
}
123+
})
110124
.addActivity(new TaskActivityFactory() {
111125
@Override public String getName() { return "GetWeather"; }
112126
@Override public TaskActivity create() {

0 commit comments

Comments
 (0)