Follow-up from #5920 (Improve Feature Server Observability).
Problem
sdk/python/feast/metrics.py currently breaks out online-feature metrics by feature_view (see online_features_status_total's feature_view label in track_feature_statuses), but there is no equivalent feature_service label anywhere in the metrics, even though requests to /get-online-features are frequently made via a named Feature Service.
Proposed solution
- Add a
feature_service label to the relevant RED metrics (at minimum request_latency/request_count in the track_request_latency context, and consider online_features_status_total).
- Resolve the feature service name in the
/get-online-features handler in sdk/python/feast/feature_server.py (available from the parsed request body) and pass it through via RequestMetricsContext, following the existing pattern used for feature_count/feature_view_count.
- Add cardinality safeguards per the original issue: make this label opt-in (config flag, default off) and/or support an allowlist of feature service names, since unbounded feature-service cardinality could blow up metric storage in large deployments.
- Wire the new config flag into
MetricsConfig / _MetricsFlags alongside the existing per-category toggles.
cc: @jyejare @ntkathole
Follow-up from #5920 (Improve Feature Server Observability).
Problem
sdk/python/feast/metrics.pycurrently breaks out online-feature metrics byfeature_view(seeonline_features_status_total'sfeature_viewlabel intrack_feature_statuses), but there is no equivalentfeature_servicelabel anywhere in the metrics, even though requests to/get-online-featuresare frequently made via a named Feature Service.Proposed solution
feature_servicelabel to the relevant RED metrics (at minimumrequest_latency/request_countin thetrack_request_latencycontext, and consideronline_features_status_total)./get-online-featureshandler insdk/python/feast/feature_server.py(available from the parsed request body) and pass it through viaRequestMetricsContext, following the existing pattern used forfeature_count/feature_view_count.MetricsConfig/_MetricsFlagsalongside the existing per-category toggles.cc: @jyejare @ntkathole