Skip to content

Commit

Permalink
Add project name to feature validation metric (#1264)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex authored Jan 12, 2021
1 parent e8d8b72 commit 9e5c41e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions sdk/python/feast/contrib/validation/ge.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def udf(df: pd.DataFrame) -> pd.Series:
value=unexpected_count,
tags=[
f"feature_table:{os.getenv('FEAST_INGESTION_FEATURE_TABLE', 'unknown')}",
f"project:{os.getenv('FEAST_INGESTION_PROJECT_NAME', 'default')}",
f"check:{check_name}",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ object StreamingPipeline extends BasePipeline with Serializable {
Map(
"STATSD_HOST" -> c.host,
"STATSD_PORT" -> c.port.toString,
"FEAST_INGESTION_FEATURE_TABLE" -> config.featureTable.name
"FEAST_INGESTION_FEATURE_TABLE" -> config.featureTable.name,
"FEAST_INGESTION_PROJECT_NAME" -> config.featureTable.project
)
case _ => Map.empty[String, String]
}
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ def test_validation_reports_metrics(

expected_metrics = [
(
f"feast_feature_validation_check_failed#check:{check_name},feature_table:validation_ge_metrics",
f"feast_feature_validation_check_failed#check:{check_name},"
f"feature_table:{feature_table.name},project:{feast_client.project}",
value,
)
for check_name, value in unexpected_counts.items()
Expand Down

0 comments on commit 9e5c41e

Please sign in to comment.