-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prometheus metrics to serving (#316)
* Add prometheus metrics to serving * Add subsystem * Use histogram instead of summary * Change timer to histogram timer * Fix configuration for serving chart for prometheus * Fix application.yaml reference in chart
- Loading branch information
1 parent
31aaed4
commit a79c77b
Showing
9 changed files
with
140 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package feast.serving.util; | ||
|
||
import io.prometheus.client.Counter; | ||
import io.prometheus.client.Histogram; | ||
import io.prometheus.client.Summary; | ||
|
||
public class Metrics { | ||
|
||
public static final Histogram requestLatency = Histogram.build() | ||
.buckets(2, 4, 6, 8, 10, 15, 20, 25, 30, 35, 50) | ||
.name("request_latency_ms") | ||
.subsystem("feast_serving") | ||
.help("Request latency in milliseconds.") | ||
.labelNames("method") | ||
.register(); | ||
|
||
public static final Counter requestCount = Counter.build() | ||
.name("request_feature_count") | ||
.subsystem("feast_serving") | ||
.help("number of feature rows requested") | ||
.labelNames("feature_set_name") | ||
.register(); | ||
|
||
public static final Counter missingKeyCount = Counter.build() | ||
.name("missing_feature_count") | ||
.subsystem("feast_serving") | ||
.help("number requested feature rows that were not found") | ||
.labelNames("feature_set_name") | ||
.register(); | ||
|
||
public static final Counter staleKeyCount = Counter.build() | ||
.name("stale_feature_count") | ||
.subsystem("feast_serving") | ||
.help("number requested feature rows that were stale") | ||
.labelNames("feature_set_name") | ||
.register(); | ||
} |
This file contains 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