Metric.watched
Emitted each time a Metric is watched.
Metric.watch emits Metric.watched when it completes on a Metric.
| Property | Value |
|---|---|
| Emitted by | Metric.watch |
| Noun | Metric |
| Wakes | None. |
Payload
Each delivery is an Event record. data holds what Metric.watch returns.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | required | Metric.watched. |
at | datetime | required | When it happened. |
seq | integer | Its position in the namespace, one more than the Event before; any seq is a cursor into the history. | |
data | json | required | The Thing as the Action left it. |
data.watch | Watch | required | The Watch that checks it. |
data.metric | Metric | required | The Metric now watched. |
data.metric.query | text | required | How it is computed. An agent never varies the Metrics it is judged by. |
data.metric.unit | string | The unit, such as dollars or percent. | |
data.metric.status | string | required | One of draft or defined. |
Example
{
"$id": "https: //api.sb/ kilnbakery.com/ events/ event_1",
"$type": "Event",
"name": "Metric.watched",
"at": "2026-10-22T12: 00: 00Z",
"data": {
"watch": {
"$id": "https: //api.sb/ kilnbakery.com/ watches/ watch_1",
"$type": "Watch",
"selector": "Example selector",
"url": "https: //kilnbakery.com"
},
"metric": {
"$id": "https: //api.sb/ kilnbakery.com/ metrics/ metric_1",
"$type": "Metric",
"query": "Example query",
"unit": "Example unit",
"status": "draft"
}
},
"seq": 1
}