Alert rules keep an eye on a metric — latency, cost, tokens, error count, or an evaluation score — over your traces or sessions and send you a notification when the metric crosses a threshold.
The response includes everything the server saved — defaults it filled in for you, and the alert's id, which you'll use for every follow-up call.
Creates a new alert in your project. The server validates the
window size, metric, environments, filter columns, and each
notification target before saving.
Param
Type
Required
Description
name
string
true
A name for the alert. 1–255 characters.
description
string | null
false
Optional free-form description. Up to 500 characters.
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
string[]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
NotificationTarget[]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Record<string, unknown> | null
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
str
true
A name for the alert. 1–255 characters.
description
Optional[str]
false
Optional free-form description. Up to 500 characters.
scope
Optional[AlertConfigScope]
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
Optional[list[str]]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
list[NotificationTargetInput]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Optional[dict[str, object]]
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
String
true
A name for the alert. 1–255 characters.
description
String
false
Optional free-form description. Up to 500 characters.
scope
AlertConfigScope
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
List<String>
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
List<NotificationTarget>
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Map<String, Object>
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
Name
string
true
A name for the alert. 1–255 characters.
Description
*string
false
Optional free-form description. Up to 500 characters.
Scope
*AlertConfigScope
AlertConfigScopeTRACE, AlertConfigScopeSESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
Environments
*[]string
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
Notifications
[]NotificationTarget
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
Notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
Notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
Notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
Filter
map[string]interface{}
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
meta contains the pagination fields (page, limit, totalItems, totalPages). Asking for a page past the last one returns an empty data array — not an error.
Lists the alerts in your project, paginated. You can narrow the
results by searching the name, or by filtering on status, scope,
or metric.
Param
Type
Required
Description
page
number
false
1-indexed page number (default 1)
Default: 1
limit
number
false
Page size, max 100 (default 50)
Default: 50
search
string
false
Substring match on alert name (case-insensitive)
status
'active' | 'paused'
"active" | "paused"
false
Filter by status — "active" or "paused"
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Optional[int]
false
1-indexed page number (default 1)
Default: 1
limit
Optional[int]
false
Page size, max 100 (default 50)
Default: 50
search
Optional[str]
false
Substring match on alert name (case-insensitive)
status
Optional[str]
"active", "paused"
false
Filter by status — "active" or "paused"
scope
Optional[str]
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
Optional[str]
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Integer
false
1-indexed page number (default 1)
Default: 1
limit
Integer
false
Page size, max 100 (default 50)
Default: 50
search
String
false
Substring match on alert name (case-insensitive)
status
String
"active", "paused"
false
Filter by status — "active" or "paused"
scope
String
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
String
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
Page
*int
false
1-indexed page number (default 1)
Default: 1
Limit
*int
false
Page size, max 100 (default 50)
Default: 50
Search
*string
false
Substring match on alert name (case-insensitive)
Status
*string
"active", "paused"
false
Filter by status — "active" or "paused"
Scope
*string
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
Metric
*string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
pause() disables an alert without deleting it — useful during a maintenance window when you don't want false alarms. resume() turns it back on. Both are simple wrappers around the /toggle endpoint.
The response includes everything the server saved — defaults it filled in for you, and the alert's id, which you'll use for every follow-up call.
Creates a new alert in your project. The server validates the
window size, metric, environments, filter columns, and each
notification target before saving.
Param
Type
Required
Description
name
string
true
A name for the alert. 1–255 characters.
description
string | null
false
Optional free-form description. Up to 500 characters.
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
string[]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
NotificationTarget[]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Record<string, unknown> | null
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
str
true
A name for the alert. 1–255 characters.
description
Optional[str]
false
Optional free-form description. Up to 500 characters.
scope
Optional[AlertConfigScope]
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
Optional[list[str]]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
list[NotificationTargetInput]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Optional[dict[str, object]]
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
String
true
A name for the alert. 1–255 characters.
description
String
false
Optional free-form description. Up to 500 characters.
scope
AlertConfigScope
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
List<String>
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
List<NotificationTarget>
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Map<String, Object>
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
Name
string
true
A name for the alert. 1–255 characters.
Description
*string
false
Optional free-form description. Up to 500 characters.
Scope
*AlertConfigScope
AlertConfigScopeTRACE, AlertConfigScopeSESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
Environments
*[]string
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
Notifications
[]NotificationTarget
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
Notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
Notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
Notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
Filter
map[string]interface{}
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
res = client.alert.list(page=1, limit=50)data = res.datameta = res.meta
meta contains the pagination fields (page, limit, total_items, total_pages). Asking for a page past the last one returns an empty data array — not an error.
Lists the alerts in your project, paginated. You can narrow the
results by searching the name, or by filtering on status, scope,
or metric.
Param
Type
Required
Description
page
number
false
1-indexed page number (default 1)
Default: 1
limit
number
false
Page size, max 100 (default 50)
Default: 50
search
string
false
Substring match on alert name (case-insensitive)
status
'active' | 'paused'
"active" | "paused"
false
Filter by status — "active" or "paused"
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Optional[int]
false
1-indexed page number (default 1)
Default: 1
limit
Optional[int]
false
Page size, max 100 (default 50)
Default: 50
search
Optional[str]
false
Substring match on alert name (case-insensitive)
status
Optional[str]
"active", "paused"
false
Filter by status — "active" or "paused"
scope
Optional[str]
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
Optional[str]
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Integer
false
1-indexed page number (default 1)
Default: 1
limit
Integer
false
Page size, max 100 (default 50)
Default: 50
search
String
false
Substring match on alert name (case-insensitive)
status
String
"active", "paused"
false
Filter by status — "active" or "paused"
scope
String
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
String
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
Page
*int
false
1-indexed page number (default 1)
Default: 1
Limit
*int
false
Page size, max 100 (default 50)
Default: 50
Search
*string
false
Substring match on alert name (case-insensitive)
Status
*string
"active", "paused"
false
Filter by status — "active" or "paused"
Scope
*string
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
Metric
*string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
pause() disables an alert without deleting it — useful during a maintenance window when you don't want false alarms. resume() turns it back on. Both are simple wrappers around the /toggle endpoint.
paused = client.alert.pause(alert_id)
resumed = client.alert.resume(alert_id)
Pause an alert without deleting its config. Convenience wrapper for
`toggleAlert(alertId, false)`.
Param
Type
Required
Description
alertId
string
true
The alert's id (returned from `create()`).
Param
Type
Required
Description
alert_id
str
true
The alert's id (returned from `create()`).
Param
Type
Required
Description
alertId
String
true
The alert's id (returned from `create()`).
Param
Type
Required
Description
alertId
string
true
The alert's id (returned from `create()`).
Re-enable a previously-paused alert. Convenience wrapper for
`toggleAlert(alertId, true)`.
NotificationTarget webhook = new NotificationTarget();webhook.channel = NotificationTargetChannel.webhook;webhook.enabled = true;Map<String, Object> webhookConfig = new HashMap<>();webhookConfig.put("url", "https://example.com/sdk-test-webhook");webhook.config = webhookConfig;CreateAlertBody body = new CreateAlertBody();body.name = "High p95 latency on production traces";body.description = "Notify on-call when average trace latency exceeds 750 ms.";body.scope = AlertConfigScope.TRACE;body.aggregation = AlertConfigAggregation.AVG;body.metric = "latency";body.operator = AlertConfigOperator.GT;body.threshold = 750.0;body.windowMinutes = AlertConfigWindowMinutes.M_5;body.cooldownMinutes = 10;body.environments = Collections.singletonList("default");body.notifications = Collections.singletonList(webhook);AlertConfig alert = client.create(body);
The response includes everything the server saved — defaults it filled in for you, and the alert's id, which you'll use for every follow-up call.
Creates a new alert in your project. The server validates the
window size, metric, environments, filter columns, and each
notification target before saving.
Param
Type
Required
Description
name
string
true
A name for the alert. 1–255 characters.
description
string | null
false
Optional free-form description. Up to 500 characters.
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
string[]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
NotificationTarget[]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Record<string, unknown> | null
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
str
true
A name for the alert. 1–255 characters.
description
Optional[str]
false
Optional free-form description. Up to 500 characters.
scope
Optional[AlertConfigScope]
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
Optional[list[str]]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
list[NotificationTargetInput]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Optional[dict[str, object]]
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
String
true
A name for the alert. 1–255 characters.
description
String
false
Optional free-form description. Up to 500 characters.
scope
AlertConfigScope
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
List<String>
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
List<NotificationTarget>
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Map<String, Object>
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
Name
string
true
A name for the alert. 1–255 characters.
Description
*string
false
Optional free-form description. Up to 500 characters.
Scope
*AlertConfigScope
AlertConfigScopeTRACE, AlertConfigScopeSESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
Environments
*[]string
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
Notifications
[]NotificationTarget
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
Notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
Notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
Notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
Filter
map[string]interface{}
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
ListAlertsParams params = new ListAlertsParams();params.page = 1;params.limit = 50;ListAlertsResponse res = client.list(params);
meta contains the pagination fields (page, limit, totalItems, totalPages). Asking for a page past the last one returns an empty data list — not an error.
Lists the alerts in your project, paginated. You can narrow the
results by searching the name, or by filtering on status, scope,
or metric.
Param
Type
Required
Description
page
number
false
1-indexed page number (default 1)
Default: 1
limit
number
false
Page size, max 100 (default 50)
Default: 50
search
string
false
Substring match on alert name (case-insensitive)
status
'active' | 'paused'
"active" | "paused"
false
Filter by status — "active" or "paused"
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Optional[int]
false
1-indexed page number (default 1)
Default: 1
limit
Optional[int]
false
Page size, max 100 (default 50)
Default: 50
search
Optional[str]
false
Substring match on alert name (case-insensitive)
status
Optional[str]
"active", "paused"
false
Filter by status — "active" or "paused"
scope
Optional[str]
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
Optional[str]
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Integer
false
1-indexed page number (default 1)
Default: 1
limit
Integer
false
Page size, max 100 (default 50)
Default: 50
search
String
false
Substring match on alert name (case-insensitive)
status
String
"active", "paused"
false
Filter by status — "active" or "paused"
scope
String
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
String
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
Page
*int
false
1-indexed page number (default 1)
Default: 1
Limit
*int
false
Page size, max 100 (default 50)
Default: 50
Search
*string
false
Substring match on alert name (case-insensitive)
Status
*string
"active", "paused"
false
Filter by status — "active" or "paused"
Scope
*string
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
Metric
*string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
pause() disables an alert without deleting it — useful during a maintenance window when you don't want false alarms. resume() turns it back on. Both are simple wrappers around the /toggle endpoint.
AlertConfig paused = client.pause(alertId);
AlertConfig resumed = client.resume(alertId);
Pause an alert without deleting its config. Convenience wrapper for
`toggleAlert(alertId, false)`.
Param
Type
Required
Description
alertId
string
true
The alert's id (returned from `create()`).
Param
Type
Required
Description
alert_id
str
true
The alert's id (returned from `create()`).
Param
Type
Required
Description
alertId
String
true
The alert's id (returned from `create()`).
Param
Type
Required
Description
alertId
string
true
The alert's id (returned from `create()`).
Re-enable a previously-paused alert. Convenience wrapper for
`toggleAlert(alertId, true)`.
The response includes everything the server saved — defaults it filled in for you, and the alert's ID, which you'll use for every follow-up call.
Creates a new alert in your project. The server validates the
window size, metric, environments, filter columns, and each
notification target before saving.
Param
Type
Required
Description
name
string
true
A name for the alert. 1–255 characters.
description
string | null
false
Optional free-form description. Up to 500 characters.
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
string[]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
NotificationTarget[]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Record<string, unknown> | null
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
str
true
A name for the alert. 1–255 characters.
description
Optional[str]
false
Optional free-form description. Up to 500 characters.
scope
Optional[AlertConfigScope]
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
Optional[list[str]]
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
list[NotificationTargetInput]
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Optional[dict[str, object]]
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
name
String
true
A name for the alert. 1–255 characters.
description
String
false
Optional free-form description. Up to 500 characters.
scope
AlertConfigScope
AlertConfigScope.TRACE, AlertConfigScope.SESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
environments
List<String>
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
notifications
List<NotificationTarget>
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
filter
Map<String, Object>
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Param
Type
Required
Description
Name
string
true
A name for the alert. 1–255 characters.
Description
*string
false
Optional free-form description. Up to 500 characters.
Scope
*AlertConfigScope
AlertConfigScopeTRACE, AlertConfigScopeSESSION
false
Whether the alert watches trace metrics or session metrics.
Minimum time between fires. Keeps you from getting a wall of duplicate notifications.
Default: 15
Environments
*[]string
false
The environments the alert runs on. Leave empty to evaluate every environment.
Default: []
Notifications
[]NotificationTarget
true
One or more places to send the notification when the alert fires — webhook, email, or Slack.
Notifications.channel
"webhook" | "email" | "slack"
true
How the notification is delivered.
Notifications.enabled
boolean
true
Whether this channel is active. Disabled channels are kept but skipped when the alert fires.
Default: true
Notifications.config
object
true
Channel-specific settings (the shape depends on `channel`).
Filter
map[string]interface{}
false
An optional filter to narrow what the alert evaluates.
`null` means "evaluate everything in scope." A non-null value
has a `mode` field that's either `"conditions"` or `"sql"`.
Meta contains the pagination fields (Page, Limit, TotalItems, TotalPages). Asking for a page past the last one returns an empty Data slice — not an error.
Lists the alerts in your project, paginated. You can narrow the
results by searching the name, or by filtering on status, scope,
or metric.
Param
Type
Required
Description
page
number
false
1-indexed page number (default 1)
Default: 1
limit
number
false
Page size, max 100 (default 50)
Default: 50
search
string
false
Substring match on alert name (case-insensitive)
status
'active' | 'paused'
"active" | "paused"
false
Filter by status — "active" or "paused"
scope
'TRACE' | 'SESSION'
"TRACE" | "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Optional[int]
false
1-indexed page number (default 1)
Default: 1
limit
Optional[int]
false
Page size, max 100 (default 50)
Default: 50
search
Optional[str]
false
Substring match on alert name (case-insensitive)
status
Optional[str]
"active", "paused"
false
Filter by status — "active" or "paused"
scope
Optional[str]
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
Optional[str]
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
page
Integer
false
1-indexed page number (default 1)
Default: 1
limit
Integer
false
Page size, max 100 (default 50)
Default: 50
search
String
false
Substring match on alert name (case-insensitive)
status
String
"active", "paused"
false
Filter by status — "active" or "paused"
scope
String
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
metric
String
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Param
Type
Required
Description
Page
*int
false
1-indexed page number (default 1)
Default: 1
Limit
*int
false
Page size, max 100 (default 50)
Default: 50
Search
*string
false
Substring match on alert name (case-insensitive)
Status
*string
"active", "paused"
false
Filter by status — "active" or "paused"
Scope
*string
"TRACE", "SESSION"
false
Filter by scope — "TRACE" or "SESSION"
Metric
*string
false
Exact match on the metric key (e.g. "latency", "score:relevance")
Pause() disables an alert without deleting it — useful during a maintenance window when you don't want false alarms. Resume() turns it back on. Both are simple wrappers around the /toggle endpoint.
Fired alerts show up in the dashboard under Project → Alerts on the Alert Events tab, and they also post to any notification channels you've set up (webhook, email, or Slack). See the Alerts UI guide for how the event lifecycle (FIRING → ACKNOWLEDGED → RESOLVED) works.