Commit 3f2ce8d
Add OpenTelemetry tracing instrumentation to API layer
Add OTel annotations and API dependencies to enable distributed tracing
of CloudStack API requests. The @WithSpan annotation on handleRequest()
tags each trace with the API command name (e.g. listVirtualMachines),
making it possible to filter and analyze per-command latency. The OTel
agent auto-instruments JDBC and HTTP calls, providing full request
waterfalls with no additional code changes.
All instrumentation is inert without the OTel Java agent attached:
@WithSpan is ignored, Span.current() returns a no-op, and the
opentelemetry-api calls return immediately with zero overhead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ddcc0c8 commit 3f2ce8d
4 files changed
Lines changed: 24 additions & 0 deletions
File tree
- api
- server
- src/main/java/com/cloud/api
- tools/docker
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
200 | 210 | | |
201 | 211 | | |
202 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
619 | 622 | | |
620 | 623 | | |
621 | 624 | | |
| 625 | + | |
622 | 626 | | |
623 | 627 | | |
624 | 628 | | |
| |||
628 | 632 | | |
629 | 633 | | |
630 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
631 | 639 | | |
632 | 640 | | |
633 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments