clipper
clipper copied to clipboard
[Metrics] Use Prometheus label system for frontend-exporter
Currently, the frontend-exporter just flatten the metric json and log each sub-metric as guage. We need to use Prometheus label system for our metrics.
For example,
{
"app:testapp1-app:prediction_latency": {
"unit": "microseconds",
"size": "1",
"min": "72",
"max": "72",
"mean": "72",
"std_dev": "0",
"p50": "72",
"p95": "72",
"p99": "72"
}
},
{
"app:testapp0-app:prediction_latency": {
"unit": "microseconds",
"size": "76",
"min": "119",
"max": "16301",
"mean": "3041.5",
"std_dev": "3085.46208473152193963",
"p50": "1874.5",
"p95": "9656.19999999998680096",
"p99": "16301"
}
},
should be
app_prediction_latency{'app': 'testapp0'} ...
app_prediction_latency{'app': 'testapp1'} ...
In short, figure out the schema and convert it appropriately.
@simon-mo Is this handled?