Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend WriteMetricsTransform in Ingestion to write feature value stats to StatsD #486

Conversation

davidheryanto
Copy link
Collaborator

What this PR does / why we need it:
This PR adds a step (blue coloured box) to write stats for numerical value of every feature to StatsD.
New step

A fixed window (default to 30s) will first be applied, before the stats calculation of each feature. This is to ensure the metrics collector is not overwhelmed with metrics data (and drop the metrics as a result). For validation of features by value, an aggregated windowed view of the values is also usually adequate.

The following gauge metrics will be sent to StatsD for every feature at the end of the window:

  • feature_value_min
  • feature_value_max
  • feature_value_mean
  • feature_value_percentile_50
  • feature_value_percentile_90
  • feature_value_percentile_95

Reason for using gauge metric type as opposed to histogram/timings in StatsD is because StatsD only support positive values for histogram metric types, while numerical feature values can be of any double value.

Which issue(s) this PR fixes:

Related to #172

Does this PR introduce a user-facing change?:


@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidheryanto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Since there are other exception like UnknownHostException that can be thrown and we want to know such error. Also change the log level to error because so it's not normal for client to fail to be created"
@davidheryanto davidheryanto force-pushed the feast-ingestion-feature-value-metric branch from 686f0f8 to ed268eb Compare February 24, 2020 01:25
…warn)

On 2nd thought, this should constitute an error not a warning
@davidheryanto
Copy link
Collaborator Author

/retest

@zhilingc
Copy link
Collaborator

/lgtm

@feast-ci-bot feast-ci-bot merged commit 5508c92 into feast-dev:master Feb 25, 2020
davidheryanto added a commit to davidheryanto/feast that referenced this pull request Feb 26, 2020
…s to StatsD (feast-dev#486)

* Extend WriteMetricsTransform to write feature value stats to StatsD

* Apply mvn spotless

* Catch all exception not just StatsDClientException during init
Since there are other exception like UnknownHostException that can be thrown and we want to know such error. Also change the log level to error because so it's not normal for client to fail to be created"

* Change log level due to invalid feature set ref to error (previously warn)
On 2nd thought, this should constitute an error not a warning

* Apply maven spotless to metric transform codes

(cherry picked from commit 5508c92)
zhilingc pushed a commit that referenced this pull request Feb 26, 2020
…s to StatsD (#486)

* Extend WriteMetricsTransform to write feature value stats to StatsD

* Apply mvn spotless

* Catch all exception not just StatsDClientException during init
Since there are other exception like UnknownHostException that can be thrown and we want to know such error. Also change the log level to error because so it's not normal for client to fail to be created"

* Change log level due to invalid feature set ref to error (previously warn)
On 2nd thought, this should constitute an error not a warning

* Apply maven spotless to metric transform codes

(cherry picked from commit 5508c92)
@ches ches added this to the v0.5.0 milestone Mar 8, 2020
@ches ches added the kind/feature New feature or request label Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants