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
845 changes: 844 additions & 1 deletion .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions examples/v2/llm-observability/DeleteLLMObsData.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Delete LLM Observability data returns "Accepted" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_llm_obs_data".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new

body = DatadogAPIClient::V2::LLMObsDataDeletionRequest.new({
data: DatadogAPIClient::V2::LLMObsDataDeletionRequestData.new({
attributes: DatadogAPIClient::V2::LLMObsDataDeletionRequestAttributes.new({
delay: 0,
from: 1705314600000,
query: {
query: "@trace_id:abc123def456",
},
to: 1705315200000,
}),
type: DatadogAPIClient::V2::LLMObsDataDeletionRequestType::CREATE_DELETION_REQ,
}),
})
p api_instance.delete_llm_obs_data(body)
8 changes: 8 additions & 0 deletions examples/v2/llm-observability/ListLLMObsSpans.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List LLM Observability spans returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_llm_obs_spans".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
p api_instance.list_llm_obs_spans()
35 changes: 35 additions & 0 deletions examples/v2/llm-observability/SearchLLMObsSpans.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Search LLM Observability spans returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.search_llm_obs_spans".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new

body = DatadogAPIClient::V2::LLMObsSearchSpansRequest.new({
data: DatadogAPIClient::V2::LLMObsSearchSpansRequestData.new({
attributes: DatadogAPIClient::V2::LLMObsSearchSpansRequestAttributes.new({
filter: DatadogAPIClient::V2::LLMObsSpanFilter.new({
from: "now-900s",
ml_app: "my-llm-app",
query: "@session_id:abc123def456",
span_id: "abc123def456",
span_kind: "llm",
span_name: "llm_call",
to: "now",
trace_id: "trace-9a8b7c6d5e4f",
}),
options: DatadogAPIClient::V2::LLMObsSpanSearchOptions.new({
include_attachments: true,
time_offset: 0,
}),
page: DatadogAPIClient::V2::LLMObsSpanPageQuery.new({
cursor: "eyJzdGFydCI6MTAwfQ==",
limit: 10,
}),
sort: "-start_ns",
}),
type: DatadogAPIClient::V2::LLMObsSearchSpansRequestType::SPANS,
}),
})
p api_instance.search_llm_obs_spans(body)
20 changes: 20 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,9 @@
"eval_name" => "String",
"body" => "LLMObsCustomEvalConfigUpdateRequest",
},
"v2.DeleteLLMObsData" => {
"body" => "LLMObsDataDeletionRequest",
},
"v2.ListLLMObsAnnotationQueues" => {
"project_id" => "String",
"queue_ids" => "Array<String>",
Expand Down Expand Up @@ -997,6 +1000,23 @@
"project_id" => "String",
"body" => "LLMObsProjectUpdateRequest",
},
"v2.ListLLMObsSpans" => {
"filter_from" => "String",
"filter_to" => "String",
"filter_query" => "String",
"filter_span_id" => "String",
"filter_trace_id" => "String",
"filter_span_kind" => "String",
"filter_span_name" => "String",
"filter_ml_app" => "String",
"page_limit" => "Integer",
"page_cursor" => "String",
"sort" => "String",
"include_attachments" => "Boolean",
},
"v2.SearchLLMObsSpans" => {
"body" => "LLMObsSearchSpansRequest",
},
"v2.ListLLMObsDatasets" => {
"project_id" => "String",
"filter_name" => "String",
Expand Down
50 changes: 48 additions & 2 deletions features/v2/llm_observability.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@endpoint(llm-observability) @endpoint(llm-observability-v2)
Feature: LLM Observability
Manage LLM Observability projects, datasets, dataset records, experiments,
and annotations.
Manage LLM Observability spans, data, projects, datasets, dataset records,
experiments, and annotations.

Background:
Given a valid "apiKeyAuth" key in the system
Expand Down Expand Up @@ -245,6 +245,22 @@ Feature: LLM Observability
When the request is sent
Then the response status is 422 Unprocessable Entity

@generated @skip @team:DataDog/ml-observability
Scenario: Delete LLM Observability data returns "Accepted" response
Given operation "DeleteLLMObsData" enabled
And new "DeleteLLMObsData" request
And body with value {"data": {"attributes": {"delay": 0, "from": 1705314600000, "query": {"query": "@trace_id:abc123def456"}, "to": 1705315200000}, "type": "create_deletion_req"}}
When the request is sent
Then the response status is 202 Accepted

@generated @skip @team:DataDog/ml-observability
Scenario: Delete LLM Observability data returns "Bad Request" response
Given operation "DeleteLLMObsData" enabled
And new "DeleteLLMObsData" request
And body with value {"data": {"attributes": {"delay": 0, "from": 1705314600000, "query": {"query": "@trace_id:abc123def456"}, "to": 1705315200000}, "type": "create_deletion_req"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: Delete LLM Observability dataset records returns "Bad Request" response
Given operation "DeleteLLMObsDatasetRecords" enabled
Expand Down Expand Up @@ -558,6 +574,20 @@ Feature: LLM Observability
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ml-observability
Scenario: List LLM Observability spans returns "Bad Request" response
Given operation "ListLLMObsSpans" enabled
And new "ListLLMObsSpans" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: List LLM Observability spans returns "OK" response
Given operation "ListLLMObsSpans" enabled
And new "ListLLMObsSpans" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ml-observability
Scenario: List events for an LLM Observability experiment returns "Bad Request" response
Given operation "ListLLMObsExperimentEvents" enabled
Expand Down Expand Up @@ -633,6 +663,22 @@ Feature: LLM Observability
When the request is sent
Then the response status is 206 Partial Content — more results are available. Use `meta.after` as the next `page.cursor`.

@generated @skip @team:DataDog/ml-observability
Scenario: Search LLM Observability spans returns "Bad Request" response
Given operation "SearchLLMObsSpans" enabled
And new "SearchLLMObsSpans" request
And body with value {"data": {"attributes": {"filter": {"from": "now-900s", "ml_app": "my-llm-app", "query": "@session_id:abc123def456", "span_id": "abc123def456", "span_kind": "llm", "span_name": "llm_call", "to": "now", "trace_id": "trace-9a8b7c6d5e4f"}, "options": {"include_attachments": true, "time_offset": 0}, "page": {"cursor": "eyJzdGFydCI6MTAwfQ==", "limit": 10}, "sort": "-start_ns"}, "type": "spans"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: Search LLM Observability spans returns "OK" response
Given operation "SearchLLMObsSpans" enabled
And new "SearchLLMObsSpans" request
And body with value {"data": {"attributes": {"filter": {"from": "now-900s", "ml_app": "my-llm-app", "query": "@session_id:abc123def456", "span_id": "abc123def456", "span_kind": "llm", "span_name": "llm_call", "to": "now", "trace_id": "trace-9a8b7c6d5e4f"}, "options": {"include_attachments": true, "time_offset": 0}, "page": {"cursor": "eyJzdGFydCI6MTAwfQ==", "limit": 10}, "sort": "-start_ns"}, "type": "spans"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ml-observability
Scenario: Simple search experimentation entities returns "Bad Request" response
Given operation "SimpleSearchLLMObsExperimentation" enabled
Expand Down
20 changes: 20 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3660,6 +3660,14 @@
"type": "idempotent"
}
},
"DeleteLLMObsData": {
"tag": "LLM Observability",
"undo": {
"operationId": "TODO",
"parameters": [],
"type": "unsafe"
}
},
"ListLLMObsAnnotationQueues": {
"tag": "LLM Observability",
"undo": {
Expand Down Expand Up @@ -3817,6 +3825,18 @@
"type": "idempotent"
}
},
"ListLLMObsSpans": {
"tag": "LLM Observability",
"undo": {
"type": "safe"
}
},
"SearchLLMObsSpans": {
"tag": "LLM Observability",
"undo": {
"type": "safe"
}
},
"ListLLMObsDatasets": {
"tag": "LLM Observability",
"undo": {
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def initialize
"v2.delete_llm_obs_annotation_queue": false,
"v2.delete_llm_obs_annotation_queue_interactions": false,
"v2.delete_llm_obs_custom_eval_config": false,
"v2.delete_llm_obs_data": false,
"v2.delete_llm_obs_dataset_records": false,
"v2.delete_llm_obs_datasets": false,
"v2.delete_llm_obs_experiments": false,
Expand All @@ -231,7 +232,9 @@ def initialize
"v2.list_llm_obs_experiment_events": false,
"v2.list_llm_obs_experiments": false,
"v2.list_llm_obs_projects": false,
"v2.list_llm_obs_spans": false,
"v2.search_llm_obs_experimentation": false,
"v2.search_llm_obs_spans": false,
"v2.simple_search_llm_obs_experimentation": false,
"v2.update_llm_obs_annotation_queue": false,
"v2.update_llm_obs_annotation_queue_label_schema": false,
Expand Down
28 changes: 28 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3748,6 +3748,14 @@ def overrides
"v2.llm_obs_custom_eval_config_update_request" => "LLMObsCustomEvalConfigUpdateRequest",
"v2.llm_obs_custom_eval_config_user" => "LLMObsCustomEvalConfigUser",
"v2.llm_obs_custom_eval_config_vertex_ai_options" => "LLMObsCustomEvalConfigVertexAIOptions",
"v2.llm_obs_data_deletion_request" => "LLMObsDataDeletionRequest",
"v2.llm_obs_data_deletion_request_attributes" => "LLMObsDataDeletionRequestAttributes",
"v2.llm_obs_data_deletion_request_data" => "LLMObsDataDeletionRequestData",
"v2.llm_obs_data_deletion_request_type" => "LLMObsDataDeletionRequestType",
"v2.llm_obs_data_deletion_response" => "LLMObsDataDeletionResponse",
"v2.llm_obs_data_deletion_response_attributes" => "LLMObsDataDeletionResponseAttributes",
"v2.llm_obs_data_deletion_response_data" => "LLMObsDataDeletionResponseData",
"v2.llm_obs_data_deletion_response_type" => "LLMObsDataDeletionResponseType",
"v2.llm_obs_dataset_data_attributes_request" => "LLMObsDatasetDataAttributesRequest",
"v2.llm_obs_dataset_data_attributes_response" => "LLMObsDatasetDataAttributesResponse",
"v2.llm_obs_dataset_data_request" => "LLMObsDatasetDataRequest",
Expand Down Expand Up @@ -3868,6 +3876,26 @@ def overrides
"v2.llm_obs_project_update_data_request" => "LLMObsProjectUpdateDataRequest",
"v2.llm_obs_project_update_request" => "LLMObsProjectUpdateRequest",
"v2.llm_obs_record_type" => "LLMObsRecordType",
"v2.llm_obs_search_spans_request" => "LLMObsSearchSpansRequest",
"v2.llm_obs_search_spans_request_attributes" => "LLMObsSearchSpansRequestAttributes",
"v2.llm_obs_search_spans_request_data" => "LLMObsSearchSpansRequestData",
"v2.llm_obs_search_spans_request_type" => "LLMObsSearchSpansRequestType",
"v2.llm_obs_span_attributes" => "LLMObsSpanAttributes",
"v2.llm_obs_span_data" => "LLMObsSpanData",
"v2.llm_obs_span_evaluation_metric" => "LLMObsSpanEvaluationMetric",
"v2.llm_obs_span_filter" => "LLMObsSpanFilter",
"v2.llm_obs_span_io" => "LLMObsSpanIO",
"v2.llm_obs_span_message" => "LLMObsSpanMessage",
"v2.llm_obs_span_page_query" => "LLMObsSpanPageQuery",
"v2.llm_obs_span_search_options" => "LLMObsSpanSearchOptions",
"v2.llm_obs_spans_response" => "LLMObsSpansResponse",
"v2.llm_obs_spans_response_links" => "LLMObsSpansResponseLinks",
"v2.llm_obs_spans_response_meta" => "LLMObsSpansResponseMeta",
"v2.llm_obs_spans_response_page" => "LLMObsSpansResponsePage",
"v2.llm_obs_span_tool_call" => "LLMObsSpanToolCall",
"v2.llm_obs_span_tool_definition" => "LLMObsSpanToolDefinition",
"v2.llm_obs_span_tool_result" => "LLMObsSpanToolResult",
"v2.llm_obs_span_type" => "LLMObsSpanType",
"v2.llm_obs_trace_annotated_interaction_item" => "LLMObsTraceAnnotatedInteractionItem",
"v2.llm_obs_trace_interaction_item" => "LLMObsTraceInteractionItem",
"v2.llm_obs_trace_interaction_response_item" => "LLMObsTraceInteractionResponseItem",
Expand Down
Loading
Loading