Skip to main content
The Monitors Service in the Galtea SDK allows you to manage monitors for your products. This Service is exposed by the galtea.monitors object.
Remember that we will be using the galtea object. More information here.

Quick Example

First, initialize the Galtea SDK:
galtea = Galtea(api_key="YOUR_API_KEY")
Create a monitor:
monitor = galtea.monitors.create(
    name="Production quality monitor",
    product_id=product_id,
    metric_group_ids=[metric_group_id],
    # Optional: watch a single version. Omit to watch every version of the product.
    # version_id="your-version-id",
    sampling_percentage=10,  # score 10% of production sessions (default)
    monthly_credit_cap=5000,  # stop scoring after 5000 credits this month; None means uncapped
    inactivity_window_minutes=5,  # a session is scored 5 minutes after its last activity (default)
)
List monitors:
monitors = galtea.monitors.list(
    product_ids=[product_id],
    statuses=["ACTIVE"],
)

Service Methods

Monitor

An always-on evaluation rule for production sessions