Skip to content

feat: Make feature-count latency histogram bins configurable #6640

Open

Description

@anshishrivastava

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

Problem

request_latency in sdk/python/feast/metrics.py is labeled with feature_count using the raw count of features requested (see track_request_latency / RequestMetricsContext.feature_count). Raw counts create unbounded label cardinality — every distinct feature count seen in production becomes its own time series. The issue asks for configurable bins instead, e.g. 1-10, 11-50, 51-200, 201+.

Proposed solution

  • Add a binning function (e.g. bin_feature_count(count: int, bins: list[int]) -> str) that maps a raw feature count to a bin label like "1-10", "11-50", "51-200", "201+".
  • Default bins should match the issue's suggestion (1-10, 11-50, 51-200, 201+) but should be configurable via MetricsConfig in feature_store.yaml (e.g. metrics.feature_count_bins: [10, 50, 200]).
  • Apply this wherever feature_count is currently set as a raw value before being passed into RequestMetricsContext in sdk/python/feast/feature_server.py.
  • Same treatment could apply to feature_view_count.
  • Update relevant docs (docs/getting-started/components/feature-server.md or wherever metrics config is documented) to describe the new config option.

cc: @jyejare @ntkathole

Activity

  1. sanskar-singh-2403 commented on Jul 30, 2026

    @sanskar-singh-2403
    Contributor

    hey @anshishrivastava i would like to pick this up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions