feat: Migrate Feature Server metrics from Prometheus client to native OpenTelemetry SDK

Aperta
#6,638 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@anshishrivastava ci sta già lavorando.

Dal 24/7/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Follow-up from #5920 (Improve Feature Server Observability).

Problem

sdk/python/feast/metrics.py currently defines all Feature Server metrics directly with prometheus_client (Counter, Gauge, Histogram), including custom multiprocess-mode handling for Gunicorn workers. This issue asks for metrics to use native OpenTelemetry APIs (opentelemetry-api / opentelemetry-sdk) so they work with any OTEL-compatible collector/exporter (Prometheus, OTEL Collector, Grafana, Datadog, etc.), not just a Prometheus-specific scrape endpoint.

Proposed solution

  • Refactor sdk/python/feast/metrics.py to define metrics via the OTel Metrics API (Counter, Histogram, UpDownCounter/Gauge equivalents from opentelemetry.metrics).
  • Preserve Prometheus scrape compatibility via the OTLP → Prometheus exporter path (or the OpenTelemetry Prometheus exporter) so existing dashboards/alerts keep working.
  • Preserve current Gunicorn multiprocess aggregation behavior (this is the trickiest part — OTel's SDK doesn't have a drop-in equivalent to prometheus_client's multiprocess mode, so this needs explicit design).
  • Keep the existing metric names and label sets unchanged where possible to avoid breaking existing consumers; note any unavoidable breaking changes in the PR description.
  • All existing tracking helpers (track_request_latency, track_online_features_entities, track_push, track_materialization, etc.) should keep the same call signatures.
  • Add additional test cases

cc: @jyejare @ntkathole

Lingua principale
Python
Stelle
7.4k
Fork
1.5k
Merge medio
2g 6h
PR unite (30g)
107

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di feast-dev/feast

Tutte le issue di feast-dev/feast

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.