fix: Skip entity/join-key columns in lookup metrics - #378
Merged
Conversation
Entity columns are prepended to the feature vector slice returned by GetOnlineFeatures with FeatureViewName left empty, but the lookup metrics aggregator recorded every vector as if it were a feature. This tagged entity keys (e.g. exp_user_id, eg_user_id) as feature_view:unknown and logged a spurious warning on every request. Fixes EAPC-22642 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
piket
approved these changes
Aug 20, 2026
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 this PR does / why we need it:
The feature server's lookup-metrics aggregator recorded every entry in the merged
featureVectorsslice returned byGetOnlineFeatures, including entity/join-key columns (e.g.exp_user_id,eg_user_id). Those columns are intentionally given an emptyFeatureViewNamesince they don't belong to any feature view (seeonlineserving.EntitiesToFeatureVectors), but the metrics code treated the empty name as an unresolved feature view, tagging itfeature_view:unknownand logging:on every request. This produced constant log/Datadog noise and an inflated/misleading "missing lookup" metric in production.
This PR filters out vectors with
FeatureViewName == ""inLookupMetricsAggregator.RecordFromFeatureVectors/RecordFromRangeFeatureVectorsbefore they're recorded, so entity columns are no longer reported as feature lookups. This brings themlpfs.featureserver.feature_lookup_requestsmetric in line with the debug-loggingFeaturesReturnedCountmetric inserver_commons.go, which already excludes entity columns.Which issue(s) this PR fixes:
Fixes EAPC-22642 (internal Jira: https://expediagroup.atlassian.net/browse/EAPC-22642)
Misc
Added unit tests
TestRecordFromFeatureVectors_SkipsEntityColumnsandTestRecordFromRangeFeatureVectors_SkipsEntityColumnscovering the new filtering behavior. Verifiedgo test ./internal/feast/metrics/... ./internal/feast/server/...passes with no regressions.