# Metrics Reference

{% hint style="warning" %}
This page applies to Feast 0.7. The content may be out of date for Feast 0.8+
{% endhint %}

Reference of the metrics that each Feast component exports:

* [Feast Core](#feast-core)
* [Feast Serving](#feast-serving)
* [Feast Ingestion Job](#feast-ingestion-job)

For how to configure Feast to export Metrics, see the [Metrics user guide.](https://docs.feast.dev/v0.11-branch/feast-on-kubernetes/advanced-1/metrics)

## Feast Core

**Exported Metrics**

Feast Core exports the following metrics:

| Metrics                              | Description                                                        | Tags                               |
| ------------------------------------ | ------------------------------------------------------------------ | ---------------------------------- |
| `feast_core_request_latency_seconds` | Feast Core's latency in serving Requests in  Seconds.              | `service`, `method`, `status_code` |
| `feast_core_feature_set_total`       | No. of Feature Sets registered with Feast Core.                    | None                               |
| `feast_core_store_total`             | No. of Stores registered with Feast Core.                          | None                               |
| `feast_core_max_memory_bytes`        | Max amount of memory the Java virtual machine will attempt to use. | None                               |
| `feast_core_total_memory_bytes`      | Total amount of memory in the Java virtual machine                 | None                               |
| `feast_core_free_memory_bytes`       | Total amount of free memory in the Java virtual machine.           | None                               |
| `feast_core_gc_collection_seconds`   | Time spent in a given JVM garbage collector in seconds.            | None                               |

**Metric Tags**

Exported Feast Core metrics may be filtered by the following tags/keys

| Tag           | Description                                                                                                |
| ------------- | ---------------------------------------------------------------------------------------------------------- |
| `service`     | Name of the Service that request is made to. Should be set to `CoreService`                                |
| `method`      | Name of the Method that the request is calling. (ie `ListFeatureSets`)                                     |
| `status_code` | Status code returned as a result of handling the requests (ie `OK`). Can be used to find request failures. |

## Feast Serving

**Exported Metrics**

Feast Serving exports the following metrics:

| Metric                                  | Description                                                                                                                                                                          | Tags                      |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- |
| `feast_serving_request_latency_seconds` | Feast Serving's latency in serving Requests in  Seconds.                                                                                                                             | `method`                  |
| `feast_serving_request_feature_count`   | No. of requests retrieving a Feature from Feast Serving.                                                                                                                             | `project`, `feature_name` |
| `feast_serving_not_found_feature_count` | No. of requests retrieving a Feature has resulted in a [`NOT_FOUND` field status.](https://docs.feast.dev/v0.11-branch/user-guide/getting-training-features#online-field-statuses)   | `project`, `feature_name` |
| `feast_serving_stale_feature_count`     | No. of requests retrieving a Feature resulted in a [`OUTSIDE_MAX_AGE` field status.](https://docs.feast.dev/v0.11-branch/user-guide/getting-training-features#online-field-statuses) | `project`, `feature_name` |
| `feast_serving_grpc_request_count`      | Total gRPC requests served.                                                                                                                                                          | `method`                  |

**Metric Tags**

Exported Feast Serving metrics may be filtered by the following tags/keys

| Tag            | Description                                                                                                |
| -------------- | ---------------------------------------------------------------------------------------------------------- |
| `method`       | Name of the Method that the request is calling. (ie `ListFeatureSets`)                                     |
| `status_code`  | Status code returned as a result of handling the requests (ie `OK`). Can be used to find request failures. |
| `project`      | Name of the project that the FeatureSet of the Feature retrieved belongs to.                               |
| `feature_name` | Name of the Feature being retrieved.                                                                       |

## Feast Ingestion Job

Feast Ingestion computes both metrics an statistics on [data ingestion.](https://docs.feast.dev/v0.11-branch/feast-on-kubernetes/user-guide/define-and-ingest-features) Make sure you familar with data ingestion concepts before proceeding.

**Metrics Namespace**

Metrics are computed at two stages of the Feature Row's/Feature Value's life cycle when being processed by the Ingestion Job:

* `Inflight`- Prior to writing data to stores, but after successful validation of data.
* `WriteToStoreSucess`-  After a successful store write.

Metrics processed by each staged will be tagged with `metrics_namespace` to the stage where the metric was computed.

**Metrics Bucketing**

Metrics with a `{BUCKET}` are computed on a 60 second window/bucket. Suffix with the following to select the bucket to use:

* `min` - minimum value.
* `max` - maximum value.
* `mean`- mean value.
* `percentile_90`- 90 percentile.
* `percentile_95`- 95 percentile.
* `percentile_99`- 99 percentile.

**Exported Metrics**

| Metric                                          | Description                                                                          | Tags                                                                                                                                                                                                                               |
| ----------------------------------------------- | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `feast_ingestion_feature_row_lag_ms_{BUCKET}`   | Lag time in milliseconds between succeeding ingested Feature Rows.                   | <p><code>feast\_store</code>, <code>feast\_project\_name</code>,<code>feast\_featureSet\_name</code>,<code>ingestion\_job\_name</code>,</p><p><code>metrics\_namespace</code></p>                                                  |
| `feast_ingestion_feature_value_lag_ms_{BUCKET}` | Lag time in milliseconds between succeeding ingested values for each Feature.        | <p><code>feast\_store</code>, <code>feast\_project\_name</code>,<code>feast\_featureSet\_name</code>,</p><p> <code>feast\_feature\_name</code>,</p><p><code>ingestion\_job\_name</code>,</p><p><code>metrics\_namespace</code></p> |
| `feast_ingestion_feature_value_{BUCKET}`        | Last value feature for each Feature.                                                 | `feast_store`, `feature_project_name`, `feast_feature_name`,`feast_featureSet_name`, `ingest_job_name`, `metrics_namepace`                                                                                                         |
| `feast_ingestion_feature_row_ingested_count`    | No. of Ingested Feature Rows                                                         | <p><code>feast\_store</code>, <code>feast\_project\_name</code>,<code>feast\_featureSet\_name</code>,<code>ingestion\_job\_name</code>,</p><p><code>metrics\_namespace</code></p>                                                  |
| `feast_ingestion_feature_value_missing_count`   | No. of times a ingested Feature values did not provide a value for the Feature.      | <p><code>feast\_store</code>, <code>feast\_project\_name</code>,<code>feast\_featureSet\_name</code>,</p><p> <code>feast\_feature\_name</code>,</p><p><code>ingestion\_job\_name</code>,</p><p><code>metrics\_namespace</code></p> |
| `feast_ingestion_deadletter_row_count`          | No. of Feature Rows that that the Ingestion Job did not successfully write to store. | `feast_store`, `feast_project_name`,`feast_featureSet_name`,`ingestion_job_name`                                                                                                                                                   |

**Metric Tags**

Exported Feast Ingestion Job metrics may be filtered by the following tags/keys

| Tag                     | Description                                                                                                |
| ----------------------- | ---------------------------------------------------------------------------------------------------------- |
| `feast_store`           | Name of the target store the Ingestion Job is writing to.                                                  |
| `feast_project_name`    | Name of the project that the ingested FeatureSet belongs to.                                               |
| `feast_featureSet_name` | Name of the Feature Set being ingested.                                                                    |
| `feast_feature_name`    | Name of the Feature being ingested.                                                                        |
| `ingestion_job_name`    | Name of the Ingestion Job performing data ingestion. Typically this is set to the Id of the Ingestion Job. |
| `metrics_namespace`     | Stage where metrics where computed. Either  `Inflight` or `WriteToStoreSuccess`                            |
