Skip to content

Metric.define

POST /{namespace}/metrics/define

Define compiles a Metric’s query against the Startup’s Events and Entries and lists every Event it reads.

Noun
Metric
Mode
do
Event
Metric.defined

Inputs

InputTypeRequiredDescription
namestringrequiredThe Metric’s name.
querytextrequiredThe query, over Events and Entries.
unitstringrequiredWhat one unit of it is.

Outputs

OutputTypeRequiredDescription
metricMetricrequiredThe defined Metric.

Effects

  • Emits Metric.defined.
  • Performed by the Analyst.
  • Two-way: it runs at once, in the try, send and do modes.
  • A Change that renames or removes an Event this Metric reads must map it to a new Event, or the Change is refused.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.Metric.define

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.