ucbrise / clipper

A low-latency prediction-serving system
http://clipper.ai
Apache License 2.0
1.4k stars 280 forks source link

[Metrics] Use Prometheus label system for frontend-exporter #430

Open simon-mo opened 6 years ago

simon-mo commented 6 years ago

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.

rkooo567 commented 5 years ago

@simon-mo Is this handled?