Skip to content

Commit d942279

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add LLM Observability to ListStreamSource (#2054)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d5e3ae3 commit d942279

File tree

7 files changed

+132
-4
lines changed

7 files changed

+132
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-10-16 20:07:14.122500",
8-
"spec_repo_commit": "86072741"
7+
"regenerated": "2024-10-17 14:10:53.037283",
8+
"spec_repo_commit": "fb024a45"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-16 20:07:14.140655",
13-
"spec_repo_commit": "86072741"
12+
"regenerated": "2024-10-17 14:10:53.055232",
13+
"spec_repo_commit": "fb024a45"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4796,6 +4796,7 @@ components:
47964796
- logs_transaction_stream
47974797
- event_stream
47984798
- rum_stream
4799+
- llm_observability_stream
47994800
example: apm_issue_stream
48004801
type: string
48014802
x-enum-varnames:
@@ -4811,6 +4812,7 @@ components:
48114812
- LOGS_TRANSACTION_STREAM
48124813
- EVENT_STREAM
48134814
- RUM_STREAM
4815+
- LLM_OBSERVABILITY_STREAM
48144816
ListStreamWidgetDefinition:
48154817
description: 'The list stream visualization displays a table of recent events
48164818
in your application that
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2024-10-15T21:46:06.749Z

cassettes/features/v1/dashboards/Create-a-new-dashboard-with-llm-observability-stream-list-stream-widget.yml

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Create a new dashboard with llm_observability_stream list_stream widget
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5+
6+
body = DatadogAPIClient::V1::Dashboard.new({
7+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
8+
title: "Example-Dashboard with list_stream widget",
9+
widgets: [
10+
DatadogAPIClient::V1::Widget.new({
11+
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
12+
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
13+
requests: [
14+
DatadogAPIClient::V1::ListStreamWidgetRequest.new({
15+
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
16+
query: DatadogAPIClient::V1::ListStreamQuery.new({
17+
data_source: DatadogAPIClient::V1::ListStreamSource::LLM_OBSERVABILITY_STREAM,
18+
query_string: "@event_type:span @parent_id:undefined",
19+
indexes: [],
20+
}),
21+
columns: [
22+
DatadogAPIClient::V1::ListStreamColumn.new({
23+
field: "@status",
24+
width: DatadogAPIClient::V1::ListStreamColumnWidth::COMPACT,
25+
}),
26+
DatadogAPIClient::V1::ListStreamColumn.new({
27+
field: "@content.prompt",
28+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
29+
}),
30+
DatadogAPIClient::V1::ListStreamColumn.new({
31+
field: "@content.response.content",
32+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
33+
}),
34+
DatadogAPIClient::V1::ListStreamColumn.new({
35+
field: "timestamp",
36+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
37+
}),
38+
DatadogAPIClient::V1::ListStreamColumn.new({
39+
field: "@ml_app",
40+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
41+
}),
42+
DatadogAPIClient::V1::ListStreamColumn.new({
43+
field: "service",
44+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
45+
}),
46+
DatadogAPIClient::V1::ListStreamColumn.new({
47+
field: "@meta.evaluations.quality",
48+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
49+
}),
50+
DatadogAPIClient::V1::ListStreamColumn.new({
51+
field: "@meta.evaluations.security",
52+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
53+
}),
54+
DatadogAPIClient::V1::ListStreamColumn.new({
55+
field: "@duration",
56+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
57+
}),
58+
],
59+
}),
60+
],
61+
}),
62+
}),
63+
],
64+
})
65+
p api_instance.create_dashboard(body)

features/v1/dashboards.feature

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,14 @@ Feature: Dashboards
500500
And the response "widgets[0].definition.requests[0].query.sort.column" is equal to "timestamp"
501501
And the response "widgets[0].definition.requests[0].query.sort.order" is equal to "desc"
502502

503+
@team:DataDog/dashboards-backend
504+
Scenario: Create a new dashboard with llm_observability_stream list_stream widget
505+
Given new "CreateDashboard" request
506+
And body with value {"layout_type":"ordered","title":"{{ unique }} with list_stream widget","widgets":[{"definition":{"type":"list_stream","requests":[{"response_format":"event_list","query":{"data_source":"llm_observability_stream","query_string":"@event_type:span @parent_id:undefined","indexes":[]},"columns":[{"field":"@status","width":"compact"},{"field":"@content.prompt","width":"auto"},{"field":"@content.response.content","width":"auto"},{"field":"timestamp","width":"auto"},{"field":"@ml_app","width":"auto"},{"field":"service","width":"auto"},{"field":"@meta.evaluations.quality","width":"auto"},{"field":"@meta.evaluations.security","width":"auto"},{"field":"@duration","width":"auto"}]}]}}]}
507+
When the request is sent
508+
Then the response status is 200 OK
509+
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "llm_observability_stream"
510+
503511
@team:DataDog/dashboards-backend
504512
Scenario: Create a new dashboard with log_stream widget
505513
Given new "CreateDashboard" request

lib/datadog_api_client/v1/models/list_stream_source.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ class ListStreamSource
3333
LOGS_TRANSACTION_STREAM = "logs_transaction_stream".freeze
3434
EVENT_STREAM = "event_stream".freeze
3535
RUM_STREAM = "rum_stream".freeze
36+
LLM_OBSERVABILITY_STREAM = "llm_observability_stream".freeze
3637
end
3738
end

0 commit comments

Comments
 (0)