Skip to main content
You are reading the docs of Galtea 5.10. Read this page in the latest version.

Returns

Returns a Monitor object for the given parameters, or None if an error occurs. Raises ValueError before any request when both metric_group_ids and specification_ids are empty.

Example

To bind a Specification instead of picking metric families:

Parameters

string
required
Name of the monitor.
string
required
The ID of the product whose production sessions this monitor scores.
list[string]
The metric family IDs (metric.metric_group_id) the monitor scores with. Pass this, specification_ids, or both. The monitor binds the family, not a specific revision, so revising a metric is picked up automatically. A self-hosted metric family is refused, because a monitor has no caller to supply the score. A Classifier (Jev) family is refused when classifier metrics are off on the deployment. In both cases create returns None instead of a Monitor.
string
The ID of a single version to watch. Omit to watch every version of the product.
number
default:"10"
Percentage of production sessions to score, from just above 0 up to 100. Defaults to 10 (10%).
int
Maximum credits to spend per month. Must be positive when set. None (default) means uncapped. The effective budget is min(organization balance, cap), so a cap may exceed the monthly allocation.
list[string]
The IDs of Specifications of the product to bind. Pass this, metric_group_ids, or both. The monitor scores the metric families the Specifications link, and follows a change to those links from its next scan. Only Policy and Capability Specifications can be bound: an Inability, or a Specification of another product, is refused, and create returns None. The monitor scores the union of the bound Specifications and the picked families.