Commit ecd5a27
committed
feat: add native Prometheus metrics exporter to stats server
Add a built-in Prometheus exposition format endpoint to the uWSGI stats
server, eliminating the need for external sidecar exporters like
uwsgi_exporter. Metric names are compatible with timonwong/uwsgi_exporter
for drop-in replacement.
GET /metrics returns Prometheus text format (42 metrics covering global,
socket, worker, app, core, and cache stats). All other paths return JSON
as before. The prometheus path is configurable via --stats-prometheus-path.
The HTTP stats layer is split into uwsgi_stats_read_request() and
uwsgi_stats_send_http_header() with an enum uwsgi_stats_format for
clean format selection.
Includes integration tests for both JSON and Prometheus endpoints.1 parent 8d116f7 commit ecd5a27
13 files changed
Lines changed: 1178 additions & 25 deletions
File tree
- core
- docs/plans
- completed
- plugins
- corerouter
- tuntap
- t
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2528 | 2528 | | |
2529 | 2529 | | |
2530 | 2530 | | |
2531 | | - | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
2532 | 2537 | | |
2533 | 2538 | | |
2534 | 2539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
368 | 369 | | |
369 | | - | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
375 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
376 | 386 | | |
377 | 387 | | |
378 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
379 | 395 | | |
380 | 396 | | |
381 | 397 | | |
| |||
0 commit comments