This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 417
Meta
mbostock edited this page Apr 17, 2012
·
2 revisions
Wiki ▸ API Reference ▸ Meta
Cube stores meta events rather than generating plaintext logs.
Any requests sent to evaluators and collectors are logged as "cube_request" events. For example, when a client connects to the metric/get WebSocket endpoint:
{
"type": "cube_request",
"time": "2012-04-15T18:25:35.322Z",
"data": {
"ip": "127.0.0.1",
"path" : "/1.0/metric/get",
"method" : "WebSocket"
}
}
Likewise, a client POSTing events to the collector:
{
"type": "cube_request",
"time": "2012-04-15T18:26:26.006Z",
"data": {
"ip": "127.0.0.1",
"path" : "/1.0/event",
"method" : "POST"
}
}
Any metric computation requests sent to evaluators are logged as "cube_compute" events. The ms
property records the number of milliseconds it took to compute the metric, which is useful for monitoring how well Cube is performing.
{
"type": "cube_compute",
"time": "2012-04-17T04:36:07.336Z",
"data": {
"expression" : "sum(random)",
"ms" : 13
}
}
If a compound metric is evaluated (such as sum(foo) + sum(bar)
), the subexpressions are computed in parallel as unary metrics (sum(foo)
and sum(bar)
), and thus generates multiple compute events.