v1

latestOpenAPI 3.0.02026-07-1346146138.4 KB
auto-monitor-setups

Create an auto monitor setup

Create a new auto monitor setup for automatic monitor creation.

The selector field is a map of span attribute key-value pairs used to filter which spans this monitor applies to. Keys are span attribute names and values can be strings, numbers, or booleans.

Common selector keys:

  • gen_ai.system — LLM provider (e.g. "openai", "anthropic")
  • gen_ai.request.model — model name (e.g. "gpt-4o", "claude-3-5-sonnet")
  • gen_ai.request.max_tokens — max tokens (number)
  • Any other span attribute from your traces
post/v2/auto-monitor-setups

Request body

evaluatorsstring[] required

List of evaluator slugs to run on matched spans

external_idstring required

Unique identifier for the auto monitor setup, used to reference it in future requests

selectorobject

Map of span attributes to filter which spans this monitor applies to. Keys are span attribute names (e.g. gen_ai.system, gen_ai.request.model) and values can be strings, numbers, or booleans. Example: {"gen_ai.system": "openai", "gen_ai.request.model": "gpt-4o", "gen_ai.request.max_tokens": 1000}

Example request

{
  "evaluators": [
    "hallucination",
    "toxicity"
  ],
  "external_id": "my-agent-monitor-1"
}

Response

Created

created_atstring
env_project_idstring
external_idstring
idstring
org_idstring
project_idstring
statusstring
updated_atstring