Skip to content

Commit cd321ce

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b567f51 of spec repo (#3862)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b38bd26 commit cd321ce

6 files changed

Lines changed: 96 additions & 1 deletion

File tree

‎.generator/schemas/v1/openapi.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10153,6 +10153,7 @@ components:
1015310153
- "data-quality alert"
1015410154
- "network-path alert"
1015510155
- "data-jobs alert"
10156+
- "llm-observability alert"
1015610157
example: "query alert"
1015710158
type: string
1015810159
x-enum-varnames:
@@ -10178,6 +10179,7 @@ components:
1017810179
- DATA_QUALITY_ALERT
1017910180
- NETWORK_PATH_ALERT
1018010181
- DATA_JOBS_ALERT
10182+
- LLM_OBSERVABILITY_ALERT
1018110183
MonitorUpdateRequest:
1018210184
description: Object describing a monitor update request.
1018310185
properties:
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
Create an LLM Observability monitor returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.monitors_api import MonitorsApi
7+
from datadog_api_client.v1.model.monitor import Monitor
8+
from datadog_api_client.v1.model.monitor_options import MonitorOptions
9+
from datadog_api_client.v1.model.monitor_thresholds import MonitorThresholds
10+
from datadog_api_client.v1.model.monitor_type import MonitorType
11+
12+
body = Monitor(
13+
name="Example-Monitor",
14+
type=MonitorType.LLM_OBSERVABILITY_ALERT,
15+
query='llm-observability("*").rollup("count").last("2h") > 0',
16+
message="LLM observability alert triggered",
17+
tags=[
18+
"test:examplemonitor",
19+
"env:ci",
20+
],
21+
options=MonitorOptions(
22+
thresholds=MonitorThresholds(
23+
critical=0.0,
24+
),
25+
include_tags=True,
26+
notify_audit=False,
27+
),
28+
)
29+
30+
configuration = Configuration()
31+
with ApiClient(configuration) as api_client:
32+
api_instance = MonitorsApi(api_client)
33+
response = api_instance.create_monitor(body=body)
34+
35+
print(response)

‎src/datadog_api_client/v1/model/monitor_type.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MonitorType(ModelSimple):
1616
"""
1717
The type of the monitor. For more information about `type`, see the [monitor options](https://docs.datadoghq.com/monitors/guide/monitor_api_options/) docs.
1818
19-
:param value: Must be one of ["composite", "event alert", "log alert", "metric alert", "process alert", "query alert", "rum alert", "service check", "synthetics alert", "trace-analytics alert", "slo alert", "event-v2 alert", "audit alert", "ci-pipelines alert", "ci-tests alert", "error-tracking alert", "database-monitoring alert", "network-performance alert", "cost alert", "data-quality alert", "network-path alert", "data-jobs alert"].
19+
:param value: Must be one of ["composite", "event alert", "log alert", "metric alert", "process alert", "query alert", "rum alert", "service check", "synthetics alert", "trace-analytics alert", "slo alert", "event-v2 alert", "audit alert", "ci-pipelines alert", "ci-tests alert", "error-tracking alert", "database-monitoring alert", "network-performance alert", "cost alert", "data-quality alert", "network-path alert", "data-jobs alert", "llm-observability alert"].
2020
:type value: str
2121
"""
2222

@@ -43,6 +43,7 @@ class MonitorType(ModelSimple):
4343
"data-quality alert",
4444
"network-path alert",
4545
"data-jobs alert",
46+
"llm-observability alert",
4647
}
4748
COMPOSITE: ClassVar["MonitorType"]
4849
EVENT_ALERT: ClassVar["MonitorType"]
@@ -66,6 +67,7 @@ class MonitorType(ModelSimple):
6667
DATA_QUALITY_ALERT: ClassVar["MonitorType"]
6768
NETWORK_PATH_ALERT: ClassVar["MonitorType"]
6869
DATA_JOBS_ALERT: ClassVar["MonitorType"]
70+
LLM_OBSERVABILITY_ALERT: ClassVar["MonitorType"]
6971

7072
@cached_property
7173
def openapi_types(_):
@@ -96,3 +98,4 @@ def openapi_types(_):
9698
MonitorType.DATA_QUALITY_ALERT = MonitorType("data-quality alert")
9799
MonitorType.NETWORK_PATH_ALERT = MonitorType("network-path alert")
98100
MonitorType.DATA_JOBS_ALERT = MonitorType("data-jobs alert")
101+
MonitorType.LLM_OBSERVABILITY_ALERT = MonitorType("llm-observability alert")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-08-11T15:01:12.326Z
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
interactions:
2+
- request:
3+
body: '{"message":"LLM observability alert triggered","name":"Test-Create_an_LLM_Observability_monitor_returns_OK_response-1786460472","options":{"include_tags":true,"notify_audit":false,"thresholds":{"critical":0}},"query":"llm-observability(\"*\").rollup(\"count\").last(\"2h\")
4+
> 0","tags":["test:testcreateanllmobservabilitymonitorreturnsokresponse1786460472","env:ci"],"type":"llm-observability
5+
alert"}'
6+
headers:
7+
accept:
8+
- application/json
9+
content-type:
10+
- application/json
11+
method: POST
12+
uri: https://api.datadoghq.com/api/v1/monitor
13+
response:
14+
body:
15+
string: '{"id":312833678,"org_id":321813,"type":"llm-observability alert","name":"Test-Create_an_LLM_Observability_monitor_returns_OK_response-1786460472","message":"LLM
16+
observability alert triggered","tags":["test:testcreateanllmobservabilitymonitorreturnsokresponse1786460472","env:ci"],"query":"llm-observability(\"*\").rollup(\"count\").last(\"2h\")
17+
> 0","options":{"include_tags":true,"notify_audit":false,"thresholds":{"critical":0.0},"notify_no_data":false,"new_host_delay":300,"groupby_simple_monitor":false,"silenced":{}},"multi":false,"created_at":1786460473000,"created":"2026-08-11T15:01:13.078330+00:00","modified":"2026-08-11T15:01:13.078330+00:00","deleted":null,"priority":null,"restricted_roles":null,"restriction_policy":null,"draft_status":"published","assets":[],"overall_state_modified":null,"overall_state":"No
18+
Data","creator":{"name":"Francesco Pighi","handle":"francesco.pighi@datadoghq.com","email":"francesco.pighi@datadoghq.com","id":21235577}}
19+
20+
'
21+
headers:
22+
content-type:
23+
- application/json
24+
status:
25+
code: 200
26+
message: OK
27+
- request:
28+
body: null
29+
headers:
30+
accept:
31+
- application/json
32+
method: DELETE
33+
uri: https://api.datadoghq.com/api/v1/monitor/312833678
34+
response:
35+
body:
36+
string: '{"deleted_monitor_id":312833678}
37+
38+
'
39+
headers:
40+
content-type:
41+
- application/json
42+
status:
43+
code: 200
44+
message: OK
45+
version: 1

‎tests/v1/features/monitors.feature‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,15 @@ Feature: Monitors
202202
And the response "query" is equal to "error-tracking-rum(\"service:foo AND @error.source:source\").rollup(\"count\").by(\"@issue.id\").last(\"1h\") >= 1"
203203
And the response "draft_status" is equal to "draft"
204204

205+
@team:DataDog/monitor-app
206+
Scenario: Create an LLM Observability monitor returns "OK" response
207+
Given new "CreateMonitor" request
208+
And body with value {"name": "{{ unique }}", "type": "llm-observability alert", "query": "llm-observability(\"*\").rollup(\"count\").last(\"2h\") > 0", "message": "LLM observability alert triggered", "tags": ["test:{{ unique_lower_alnum }}", "env:ci"], "options": {"thresholds": {"critical": 0}, "include_tags": true, "notify_audit": false}}
209+
When the request is sent
210+
Then the response status is 200 OK
211+
And the response "name" is equal to "{{ unique }}"
212+
And the response "type" is equal to "llm-observability alert"
213+
205214
@generated @skip @team:DataDog/monitor-app
206215
Scenario: Delete a monitor returns "Bad Request" response
207216
Given new "DeleteMonitor" request

0 commit comments

Comments
 (0)