Skip to main content
POST
/
v3
/
evaluator-rules
Create New Evaluator Rule
curl --request POST \
  --url https://api.example.com/v3/evaluator-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "evaluator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mapped_input_keys": {},
  "backfill": false,
  "sampling_rate": 1,
  "backfill_start_time": "2023-11-07T05:31:56Z"
}
'
{
  "api_version": "3.0",
  "kind": "NORMAL",
  "data": {
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "evaluator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "evaluator_name": "<string>",
    "evaluator_type_display_name": "<string>",
    "mapped_input_keys": {},
    "filters": {
      "rules": []
    },
    "outputs": [
      {
        "name": "<string>",
        "possible_values": [
          "<string>"
        ]
      }
    ],
    "enabled": true,
    "backfill": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "backfill_start_time": "2023-11-07T05:31:56Z"
    },
    "sampling_rate": 0.5,
    "application": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for creating a Rule evaluator with filters

name
string
required

Name of the Rule evaluator

application_id
string<uuid>
required

Application UUID

evaluator_id
string<uuid>
required

UUID of the corresponding evaluator

mapped_input_keys
object
required

Mapping of input key names to attribute paths

filters
object

Filters for applying Rule evaluator

backfill
boolean
default:false

Whether to backfill already ingested spans

sampling_rate
number<float>
default:1

Fraction of matching spans on which this evaluator runs, in the half-open range (0.0, 1.0]. Defaults to 1.0 (every matching span). Traces are always persisted even when downsampling is enabled. To pause evaluation entirely, create the rule and then PATCH it with enabled=false — a small sampling_rate is not a pause mechanism (and enabled is not accepted on this create request).

Required range: 0 < x <= 1
backfill_start_time
string<date-time> | null

Starting point for backfill in case backfill is not required for the entire period

Response

Details of the created evaluator rule

Response object for standard API responses.

api_version
enum<string>
default:3.0

API version.

Available options:
2.0,
3.0
kind
enum<string>
default:NORMAL

Type of response, indicating a normal response.

Available options:
NORMAL
data
object

Rule Evaluator