Commit a20798a
Prefix all admin API endpoints with /api/v1/ (open-telemetry#2486)
Adds `/api/v1/` versioning prefix to all admin API endpoints to support
future API evolution without breaking changes.
# Change Summary
All API routes are nested under `/api/v1` in a single place (`lib.rs`)
using Axum's `Router::nest`. UI routes (`/`, `/dashboard`, `/static/*`)
remain at root.
```rust
// Before
let app = Router::new()
.merge(health::routes()) // /status, /livez, /readyz
.merge(telemetry::routes()) // /telemetry/metrics, /metrics
.merge(pipeline_group::routes())
.merge(pipeline::routes())
.merge(dashboard::routes());
// After
let api_routes = Router::new()
.merge(health::routes()) // → /api/v1/status, /api/v1/livez, /api/v1/readyz
.merge(telemetry::routes()) // → /api/v1/telemetry/metrics, /api/v1/metrics
.merge(pipeline_group::routes())
.merge(pipeline::routes());
let app = Router::new()
.nest("/api/v1", api_routes)
.merge(dashboard::routes()); // unchanged
```
**UI updated:**
- `metrics-api.js`: endpoint candidates updated to
`/api/v1/telemetry/metrics` and `/api/v1/metrics`
- `polling-controller.js`: health/status fetch paths updated to
`/api/v1/livez`, `/api/v1/readyz`, `/api/v1/status`
**Docs updated:**
- `crates/admin/README.md` and `docs/admin/architecture.md` reflect new
paths
**Validation crate updated:**
- `crates/validation/src/simulate.rs`: `wait_for_ready`,
`fetch_metrics`, and `shutdown_pipeline` now use `/api/v1/readyz`,
`/api/v1/telemetry/metrics`, and `/api/v1/pipeline-groups/shutdown`
respectively
**Pipeline perf test infrastructure updated:**
- All YAML/Jinja2 test suite configs under `tools/pipeline_perf_test/`
updated from `/telemetry/metrics` → `/api/v1/telemetry/metrics` and
`/pipeline-groups/` → `/api/v1/pipeline-groups/` (14 files across
`continuous/`, `nightly/`, and `templates/` directories)
## What issue does this PR close?
## How are these changes tested?
All 9 existing admin unit tests pass. The UI polling logic is covered by
existing JS module tests. The full `cargo xtask check` was run per
AGENTS.md requirements: structure checks ✅, `cargo fmt --all` ✅, `cargo
clippy --workspace --all-targets -- -D warnings` ✅. The
`otap-df-validation` integration tests (`no_processor`,
`debug_processor`, `attribute_processor_pipeline`,
`filter_processor_pipeline`) now pass with the updated endpoint paths.
## Are there any user-facing changes?
Yes. All admin API endpoints now require the `/api/v1/` prefix:
| Old | New |
|-----|-----|
| `/status` | `/api/v1/status` |
| `/livez` | `/api/v1/livez` |
| `/readyz` | `/api/v1/readyz` |
| `/metrics` | `/api/v1/metrics` |
| `/telemetry/metrics` | `/api/v1/telemetry/metrics` |
| `/telemetry/metrics/aggregate` | `/api/v1/telemetry/metrics/aggregate`
|
| `/pipeline-groups/status` | `/api/v1/pipeline-groups/status` |
| `/pipeline-groups/shutdown` | `/api/v1/pipeline-groups/shutdown` |
| `/pipeline-groups/{g}/pipelines/{p}/status` |
`/api/v1/pipeline-groups/{g}/pipelines/{p}/status` |
The embedded UI continues to work as its fetch paths are updated in
lockstep.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lquerel <657994+lquerel@users.noreply.github.com>
Co-authored-by: Laurent Quérel <l.querel@f5.com>
Co-authored-by: jmacd <3629705+jmacd@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>1 parent ff90344 commit a20798a
24 files changed
Lines changed: 101 additions & 94 deletions
File tree
- rust/otap-dataflow
- crates
- admin
- src
- ui/js
- validation/src
- docs/admin
- tools/pipeline_perf_test/test_suites/integration
- continuous
- nightly
- templates/test_steps
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
164 | | - | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
0 commit comments