@@ -123,7 +123,7 @@ public GetOnlineFeaturesResponse getOnlineFeatures(GetOnlineFeaturesRequest requ
123123 entityStatusesMap .get (entityRow ).putAll (statusMap );
124124
125125 // Populate metrics/log request
126- populateStaleKeyCountMetrics (statusMap , featureSetRequest );
126+ populateCountMetrics (statusMap , featureSetRequest );
127127 });
128128 populateRequestCountMetrics (featureSetRequest );
129129 logFeatureRows .add (featureRows );
@@ -287,7 +287,7 @@ private void logFeatureRowsTrace(
287287 scope .span ().log (ImmutableMap .of ("event" , "featureRows" , "value" , loggableFeatureRows ));
288288 }
289289
290- private void populateStaleKeyCountMetrics (
290+ private void populateCountMetrics (
291291 Map <String , FieldStatus > statusMap , FeatureSetRequest featureSetRequest ) {
292292 String project = featureSetRequest .getSpec ().getProject ();
293293 statusMap
@@ -296,6 +296,9 @@ private void populateStaleKeyCountMetrics(
296296 es -> {
297297 String featureRefString = es .getKey ();
298298 FieldStatus status = es .getValue ();
299+ if (status == FieldStatus .NOT_FOUND ) {
300+ Metrics .notFoundKeyCount .labels (project , featureRefString ).inc ();
301+ }
299302 if (status == FieldStatus .OUTSIDE_MAX_AGE ) {
300303 Metrics .staleKeyCount .labels (project , featureRefString ).inc ();
301304 }
0 commit comments