Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10153,6 +10153,7 @@ components:
- "data-quality alert"
- "network-path alert"
- "data-jobs alert"
- "llm-observability alert"
example: "query alert"
type: string
x-enum-varnames:
Expand All @@ -10178,6 +10179,7 @@ components:
- DATA_QUALITY_ALERT
- NETWORK_PATH_ALERT
- DATA_JOBS_ALERT
- LLM_OBSERVABILITY_ALERT
MonitorUpdateRequest:
description: Object describing a monitor update request.
properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-08-11T15:01:12.326Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions examples/v1/monitors/CreateMonitor_1348801712.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Create an LLM Observability monitor returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::MonitorsAPI.new

body = DatadogAPIClient::V1::Monitor.new({
name: "Example-Monitor",
type: DatadogAPIClient::V1::MonitorType::LLM_OBSERVABILITY_ALERT,
query: 'llm-observability("*").rollup("count").last("2h") > 0',
message: "LLM observability alert triggered",
tags: [
"test:examplemonitor",
"env:ci",
],
options: DatadogAPIClient::V1::MonitorOptions.new({
thresholds: DatadogAPIClient::V1::MonitorThresholds.new({
critical: 0,
}),
include_tags: true,
notify_audit: false,
}),
})
p api_instance.create_monitor(body)
9 changes: 9 additions & 0 deletions features/v1/monitors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ Feature: Monitors
And the response "query" is equal to "error-tracking-rum(\"service:foo AND @error.source:source\").rollup(\"count\").by(\"@issue.id\").last(\"1h\") >= 1"
And the response "draft_status" is equal to "draft"

@team:DataDog/monitor-app
Scenario: Create an LLM Observability monitor returns "OK" response
Given new "CreateMonitor" request
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}}
When the request is sent
Then the response status is 200 OK
And the response "name" is equal to "{{ unique }}"
And the response "type" is equal to "llm-observability alert"

@generated @skip @team:DataDog/monitor-app
Scenario: Delete a monitor returns "Bad Request" response
Given new "DeleteMonitor" request
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/monitor_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ class MonitorType
DATA_QUALITY_ALERT = "data-quality alert".freeze
NETWORK_PATH_ALERT = "network-path alert".freeze
DATA_JOBS_ALERT = "data-jobs alert".freeze
LLM_OBSERVABILITY_ALERT = "llm-observability alert".freeze
end
end
Loading