Create a monitor
Create a monitor on a project: TRACING on an LLM tracing project, or
DATA_QUALITY on an ML project. The monitor is published and starts
evaluating immediately, and the response matches
GET /v2/monitors/{monitor_id}.
Payload Requirements
type,project_id,name,metric,dimensionandthresholdare required. Field-level limits are documented on each field.project_idmust be a project of the kindtypeneeds that is not an Arize demo project.dimension.nameand each filter’s name must match the project’s data exactly: recent tracing data forTRACING, the monitoredenvironmentforDATA_QUALITY. ACUSTOM_BASELINEreads production data, so its filters and the monitored dimension must also be in production data. Embedding and dictionary fields cannot be monitored or filtered.metricmust suit the dimension; each request’smetricfield lists the metrics each kind of dimension supports.DATA_QUALITYmonitors requirebaseline_configforNEW_VALUESandMISSING_VALUESand reject it otherwise.MODEL_BASELINErequires a primary baseline, and everymodel_versionsentry must be a version of the project.INTEGRATIONandWEBHOOKdestinations require a plan with alert integrations and must belong to the project’s organization.- Unknown fields,
nullvalues and system-managed fields (id,status,created_atand so on) are rejected.
Structural problems return 400, and values that break a rule above
return 422, including a project of the wrong kind for type. A
project that does not exist or that the caller cannot read returns
404. A caller who can read the project but cannot create monitors in
it gets 403 before the body is validated. A 5xx does not guarantee
the monitor was not created, so list the project’s monitors by name
before retrying.
Valid example
{
"type": "TRACING",
"project_id": "TW9kZWw6MTIz",
"name": "Root span latency p95",
"metric": "P95",
"dimension": { "category": "SPAN_ATTRIBUTE", "name": "latency_ms" },
"threshold": { "type": "MANUAL_SINGLE", "operator": "GREATER_THAN", "value": 2000 },
"evaluation_window_length_seconds": 3600,
"filters": [
{
"dimension": { "category": "SPAN_ATTRIBUTE", "name": "parent_id" },
"operator": "EQUALS",
"values": ["NULL"]
}
],
"notification_configs": [
{ "type": "EMAIL", "email_address": "oncall@example.com" }
]
}
Invalid example (a system-managed field, and a range whose lower bound uses an upper-bound operator)
{
"id": "TW9uaXRvcjo0NTY=",
"type": "TRACING",
"project_id": "TW9kZWw6MTIz",
"name": "Hallucination rate",
"metric": "AVG",
"dimension": { "category": "LLM_EVAL", "name": "eval.hallucination.score" },
"threshold": {
"type": "MANUAL_RANGE",
"lower": { "operator": "LESS_THAN", "value": 0.2 },
"upper": { "operator": "LESS_THAN", "value": 0.8 }
}
}
Authorizations
Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format
Service accounts may instead present an access token issued by an external identity provider (Microsoft Entra ID) when the account admin has configured that provider. Send it in the same header: Authorization: Bearer <access-token>.
Body
The monitor to create. type selects the variant.
- Option 1
- Option 2
The monitor to create. type selects the variant: TRACING on an LLM
tracing project, or DATA_QUALITY on an ML project.
Response
Returns a single monitor object
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
A monitor. The type field discriminates which variant (and therefore which type-specific fields) applies.
Was this page helpful?