You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/observability.md
+26-2Lines changed: 26 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,14 +19,24 @@ OpenTelemetry tracing in leeway captures:
19
19
```
20
20
Root Span (leeway.build)
21
21
├── Package Span 1 (leeway.package)
22
+
│ ├── Phase Span (leeway.phase: prep)
23
+
│ ├── Phase Span (leeway.phase: pull)
24
+
│ ├── Phase Span (leeway.phase: lint)
25
+
│ ├── Phase Span (leeway.phase: test)
26
+
│ ├── Phase Span (leeway.phase: build)
27
+
│ └── Phase Span (leeway.phase: package)
22
28
├── Package Span 2 (leeway.package)
29
+
│ ├── Phase Span (leeway.phase: prep)
30
+
│ └── Phase Span (leeway.phase: build)
23
31
└── Package Span N (leeway.package)
32
+
└── ...
24
33
```
25
34
26
35
-**Root Span**: Created when `BuildStarted` is called, represents the entire build operation
27
36
-**Package Spans**: Created for each package being built, as children of the root span
37
+
-**Phase Spans**: Created for each build phase (prep, pull, lint, test, build, package) as children of package spans
28
38
29
-
Build phase durations (prep, pull, lint, test, build, package) are captured as attributes on package spans, not as separate spans. This design provides lower overhead and simpler hierarchy while maintaining visibility into phase-level performance.
39
+
Phase spans provide detailed timeline visualization and capture individual phase errors. Only phases with commands are executed and create spans.
30
40
31
41
### Context Propagation
32
42
@@ -35,6 +45,7 @@ Leeway supports W3C Trace Context propagation, allowing builds to be part of lar
35
45
1.**Parent Context**: Accepts `traceparent` and `tracestate` headers from upstream systems
36
46
2.**Root Context**: Creates a root span linked to the parent context
37
47
3.**Package Context**: Each package span is a child of the root span
48
+
4.**Phase Context**: Each phase span is a child of its package span
0 commit comments