Commit 998ca94
Add distributed tracing (OpenTelemetry) support
Add W3C Trace Context propagation throughout the SDK, enabling
end-to-end distributed tracing from client to orchestrations,
activities, and sub-orchestrations.
Core changes:
- TracingHelper.java: utility class for trace context capture,
extraction, and span management
- DurableTaskGrpcClient: refactored to use TracingHelper
- TaskOrchestrationExecutor: reads parentTraceContext from
ExecutionStartedEvent and propagates to ScheduleTaskAction
and CreateSubOrchestrationAction
- DurableTaskGrpcWorker: wraps activity and orchestration
execution in OTel spans with proper scope management
- OrchestrationRunner: adds orchestration span for Azure
Functions execution path
Tests:
- TracingHelperTest: 12 tests covering all utility methods
- TaskOrchestrationExecutorTest: 3 new tests verifying trace
context propagation to activities and sub-orchestrations
Samples:
- TracingPattern.java: standalone SDK sample with DTS emulator
and Jaeger OTLP exporter
- TracingChain.java: Azure Functions sample with chained
activities and sub-orchestration
- README.md with screenshots showing Jaeger traces and DTS
dashboard
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b446edf commit 998ca94
File tree
15 files changed
+1115
-40
lines changed- client
- src
- main/java/com/microsoft/durabletask
- test/java/com/microsoft/durabletask
- samples-azure-functions/src/main/java/com/functions
- samples
- images
- src/main/java/io/durabletask/samples
15 files changed
+1115
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
Lines changed: 3 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
171 | 141 | | |
172 | 142 | | |
173 | 143 | | |
| |||
Lines changed: 54 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
176 | | - | |
177 | | - | |
178 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
179 | 209 | | |
180 | 210 | | |
181 | 211 | | |
| |||
218 | 248 | | |
219 | 249 | | |
220 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
221 | 266 | | |
222 | 267 | | |
223 | 268 | | |
| |||
228 | 273 | | |
229 | 274 | | |
230 | 275 | | |
| 276 | + | |
| 277 | + | |
231 | 278 | | |
232 | 279 | | |
233 | 280 | | |
234 | 281 | | |
235 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
236 | 286 | | |
237 | 287 | | |
238 | 288 | | |
239 | | - | |
| 289 | + | |
240 | 290 | | |
241 | 291 | | |
242 | 292 | | |
| |||
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
146 | 151 | | |
147 | 152 | | |
148 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
149 | 172 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
153 | 185 | | |
154 | 186 | | |
155 | 187 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
410 | 418 | | |
411 | 419 | | |
412 | 420 | | |
| |||
877 | 885 | | |
878 | 886 | | |
879 | 887 | | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
880 | 891 | | |
881 | 892 | | |
882 | 893 | | |
| |||
0 commit comments