[PR #1635] [CLOSED] Add a prometheus metrics endpoint with llama.cpp's names #3572

Closed
opened 2026-11-07 14:42:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1635
Author: @zeevo
Created: 10/9/2026
Status: ❌ Closed

Base: main ← Head: prometheus-llamacpp


📝 Commits (1)

  • c3a94c8 add a prometheus metrics endpoint

📊 Changes

3 files changed (+75 additions, -0 deletions)

View changed files

📝 docs/DETAILS.md (+1 -0)
📝 serve/server.py (+38 -0)
📝 serve/test_server.py (+36 -0)

📄 Description

Replaces #877, which GitHub closed when main was force-pushed. Same commit, cherry-picked onto the new main.

Adds GET /metrics/prometheus: request totals and what is running in Prometheus' text format, under llama-server's metric names (llamacpp:prompt_tokens_seconds, llamacpp:predicted_tokens_seconds, llamacpp:requests_processing, ...), plus Strata's drafts and requests as strata:*. Tools that read only llama.cpp's /metrics (llm-visuals, as described in #877) work unchanged.

It sits next to #793's vLLM-named output on GET /metrics and does not change it or the Monitor's JSON.

Tests: python -m unittest serve.test_server serve.test_prometheus (278 OK).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1635 **Author:** [@zeevo](https://github.com/zeevo) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `prometheus-llamacpp` --- ### 📝 Commits (1) - [`c3a94c8`](https://github.com/Niko1221/Strata/commit/c3a94c80f55b95f565464b1302dbc4d0386fef01) add a prometheus metrics endpoint ### 📊 Changes **3 files changed** (+75 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+1 -0) 📝 `serve/server.py` (+38 -0) 📝 `serve/test_server.py` (+36 -0) </details> ### 📄 Description Replaces #877, which GitHub closed when `main` was force-pushed. Same commit, cherry-picked onto the new `main`. Adds `GET /metrics/prometheus`: request totals and what is running in Prometheus' text format, under llama-server's metric names (`llamacpp:prompt_tokens_seconds`, `llamacpp:predicted_tokens_seconds`, `llamacpp:requests_processing`, ...), plus Strata's drafts and requests as `strata:*`. Tools that read only llama.cpp's `/metrics` (llm-visuals, as described in #877) work unchanged. It sits next to #793's vLLM-named output on `GET /metrics` and does not change it or the Monitor's JSON. Tests: `python -m unittest serve.test_server serve.test_prometheus` (278 OK). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:42:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3572
No description provided.