# Metric.defined

URL: /business/events/Metric.defined · Id: `event:Metric.defined`

> Emitted each time a Metric is defined.

[Metric.define](/business/nouns/metric/define) emits `Metric.defined` when it completes on a [Metric](/business/nouns/metric).

| Property | Value |
| --- | --- |
| Emitted by | [Metric.define](/business/nouns/metric/define) |
| Noun | [Metric](/business/nouns/metric) |
| Moves | [Metric](/business/nouns/metric) `draft` to `defined` |
| Wakes | None. |

### Payload
Each delivery is an [Event](/business/nouns/event) record. `data` holds what [Metric.define](/business/nouns/metric/define) returns, and `previous` holds the state it left.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | `Metric.defined`. |
| `at` | `datetime` | Yes | When it happened. |
| `seq` | `integer` | No | Its position in the namespace, one more than the Event before; any seq is a cursor into the history. |
| `data` | `json` | Yes | The Thing as the Action left it. |
| `data.metric` | [Metric](/business/nouns/metric) | Yes | The defined Metric. |
| `data.metric.query` | `text` | Yes | How it is computed. An agent never varies the Metrics it is judged by. |
| `data.metric.unit` | `string` | No | The unit, such as dollars or percent. |
| `data.metric.status` | `string` | Yes | One of `draft` or `defined`. |
| `data.previous.status` | `string` | Yes | The `status` before this Event: `draft`. |

### Example
```json
{
  "$id": "https://api.sb/kilnbakery.com/events/event_1",
  "$type": "Event",
  "name": "Metric.defined",
  "at": "2026-10-22T12:00:00Z",
  "data": {
    "metric": {
      "$id": "https://api.sb/kilnbakery.com/metrics/metric_1",
      "$type": "Metric",
      "query": "Example query",
      "unit": "Example unit",
      "status": "defined"
    },
    "previous": {
      "status": "draft"
    }
  },
  "seq": 1
}
```