Repository navigation
Conversation
Collect the Prometheus metrics exposed by Hugging Face Text Embeddings Inference: request counts and failures, end-to-end, tokenization, queue and inference latency, queue depth, batching, and the per-input embed and predict metrics. Signed-off-by: Lucas Barros <lucasbarros.kam@gmail.com>
joepeeples
approved these changes
Nov 5, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new Agent-based integration for Hugging Face Text Embeddings Inference (TEI).
The check scrapes the Prometheus endpoint TEI serves at
/metricsand maps thete_*metrics tohugging_face_tei.*: request counts, successes and failures (theerrlabel is renamed toerror_type, as in the TGI integration), end-to-end, tokenization, queue and inference latency histograms, queue size, batching, and the per-inputembed(embedding models) andpredict(re-ranker and classification models) families.Motivation
TEI is the embedding and re-ranking backend in many RAG deployments, often running next to TGI or vLLM. The
hugging_face_tgiintegration in integrations-core covers text generation, but there is no integration for TEI. Metric names follow the same layout ashugging_face_tgiso both can be used side by side.I'm happy to be listed as the maintainer of this integration.
Review checklist
Additional Notes
metrics.txtfrom an embedding model (sentence-transformers/all-MiniLM-L6-v2) andmetrics_rerank.txtfrom a re-ranker (cross-encoder/ms-marco-MiniLM-L-6-v2). Theembedandpredictfamilies are exclusive to each model type, so the metadata symmetry test runs the check against both.ddev test hugging_face_tei(unit),ddev test --lint, andddev validate(config, models, metadata, service-checks, readmes, openmetrics, typos). I also ran the check against a live TEI server./metricsis a public route in TEI, so it does not need the API key.