Skip to content

Commit 574c59a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 68368962 of spec repo
1 parent f5e98f5 commit 574c59a

File tree

7 files changed

+148
-5
lines changed

7 files changed

+148
-5
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-10 19:45:55.876636",
8-
"spec_repo_commit": "049920eb"
7+
"regenerated": "2024-10-15 22:01:25.697667",
8+
"spec_repo_commit": "68368962"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-10 19:45:55.894524",
13-
"spec_repo_commit": "049920eb"
12+
"regenerated": "2024-10-15 22:01:25.715075",
13+
"spec_repo_commit": "68368962"
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
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
"""
2+
Create a new dashboard with llm_observability_stream list_stream widget
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
7+
from datadog_api_client.v1.model.dashboard import Dashboard
8+
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
9+
from datadog_api_client.v1.model.list_stream_column import ListStreamColumn
10+
from datadog_api_client.v1.model.list_stream_column_width import ListStreamColumnWidth
11+
from datadog_api_client.v1.model.list_stream_query import ListStreamQuery
12+
from datadog_api_client.v1.model.list_stream_response_format import ListStreamResponseFormat
13+
from datadog_api_client.v1.model.list_stream_source import ListStreamSource
14+
from datadog_api_client.v1.model.list_stream_widget_definition import ListStreamWidgetDefinition
15+
from datadog_api_client.v1.model.list_stream_widget_definition_type import ListStreamWidgetDefinitionType
16+
from datadog_api_client.v1.model.list_stream_widget_request import ListStreamWidgetRequest
17+
from datadog_api_client.v1.model.widget import Widget
18+
19+
body = Dashboard(
20+
layout_type=DashboardLayoutType.ORDERED,
21+
title="Example-Dashboard with list_stream widget",
22+
widgets=[
23+
Widget(
24+
definition=ListStreamWidgetDefinition(
25+
type=ListStreamWidgetDefinitionType.LIST_STREAM,
26+
requests=[
27+
ListStreamWidgetRequest(
28+
response_format=ListStreamResponseFormat.EVENT_LIST,
29+
query=ListStreamQuery(
30+
data_source=ListStreamSource.LLM_OBSERVABILITY_STREAM,
31+
query_string="@event_type:span @parent_id:undefined",
32+
indexes=[],
33+
),
34+
columns=[
35+
ListStreamColumn(
36+
field="@status",
37+
width=ListStreamColumnWidth.COMPACT,
38+
),
39+
ListStreamColumn(
40+
field="@content.prompt",
41+
width=ListStreamColumnWidth.AUTO,
42+
),
43+
ListStreamColumn(
44+
field="@content.response.content",
45+
width=ListStreamColumnWidth.AUTO,
46+
),
47+
ListStreamColumn(
48+
field="timestamp",
49+
width=ListStreamColumnWidth.AUTO,
50+
),
51+
ListStreamColumn(
52+
field="@ml_app",
53+
width=ListStreamColumnWidth.AUTO,
54+
),
55+
ListStreamColumn(
56+
field="service",
57+
width=ListStreamColumnWidth.AUTO,
58+
),
59+
ListStreamColumn(
60+
field="@meta.evaluations.quality",
61+
width=ListStreamColumnWidth.AUTO,
62+
),
63+
ListStreamColumn(
64+
field="@meta.evaluations.security",
65+
width=ListStreamColumnWidth.AUTO,
66+
),
67+
ListStreamColumn(
68+
field="@duration",
69+
width=ListStreamColumnWidth.AUTO,
70+
),
71+
],
72+
),
73+
],
74+
),
75+
),
76+
],
77+
)
78+
79+
configuration = Configuration()
80+
with ApiClient(configuration) as api_client:
81+
api_instance = DashboardsApi(api_client)
82+
response = api_instance.create_dashboard(body=body)
83+
84+
print(response)

src/datadog_api_client/v1/model/list_stream_source.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ListStreamSource(ModelSimple):
1616
"""
1717
Source from which to query items to display in the stream.
1818
19-
:param value: If omitted defaults to "apm_issue_stream". Must be one of ["logs_stream", "audit_stream", "ci_pipeline_stream", "ci_test_stream", "rum_issue_stream", "apm_issue_stream", "trace_stream", "logs_issue_stream", "logs_pattern_stream", "logs_transaction_stream", "event_stream", "rum_stream"].
19+
:param value: If omitted defaults to "apm_issue_stream". Must be one of ["logs_stream", "audit_stream", "ci_pipeline_stream", "ci_test_stream", "rum_issue_stream", "apm_issue_stream", "trace_stream", "logs_issue_stream", "logs_pattern_stream", "logs_transaction_stream", "event_stream", "rum_stream", "llm_observability_stream"].
2020
:type value: str
2121
"""
2222

@@ -33,6 +33,7 @@ class ListStreamSource(ModelSimple):
3333
"logs_transaction_stream",
3434
"event_stream",
3535
"rum_stream",
36+
"llm_observability_stream",
3637
}
3738
LOGS_STREAM: ClassVar["ListStreamSource"]
3839
AUDIT_STREAM: ClassVar["ListStreamSource"]
@@ -46,6 +47,7 @@ class ListStreamSource(ModelSimple):
4647
LOGS_TRANSACTION_STREAM: ClassVar["ListStreamSource"]
4748
EVENT_STREAM: ClassVar["ListStreamSource"]
4849
RUM_STREAM: ClassVar["ListStreamSource"]
50+
LLM_OBSERVABILITY_STREAM: ClassVar["ListStreamSource"]
4951

5052
@cached_property
5153
def openapi_types(_):
@@ -66,3 +68,4 @@ def openapi_types(_):
6668
ListStreamSource.LOGS_TRANSACTION_STREAM = ListStreamSource("logs_transaction_stream")
6769
ListStreamSource.EVENT_STREAM = ListStreamSource("event_stream")
6870
ListStreamSource.RUM_STREAM = ListStreamSource("rum_stream")
71+
ListStreamSource.LLM_OBSERVABILITY_STREAM = ListStreamSource("llm_observability_stream")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2024-10-15T21:46:06.749Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
interactions:
2+
- request:
3+
body: '{"layout_type":"ordered","title":"Test-Create_a_new_dashboard_with_llm_observability_stream_list_stream_widget-1729028766
4+
with list_stream widget","widgets":[{"definition":{"requests":[{"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"}],"query":{"data_source":"llm_observability_stream","indexes":[],"query_string":"@event_type:span
5+
@parent_id:undefined"},"response_format":"event_list"}],"type":"list_stream"}}]}'
6+
headers:
7+
accept:
8+
- application/json
9+
content-type:
10+
- application/json
11+
method: POST
12+
uri: https://api.datadoghq.com/api/v1/dashboard
13+
response:
14+
body:
15+
string: '{"id":"k3w-qcg-ug8","title":"Test-Create_a_new_dashboard_with_llm_observability_stream_list_stream_widget-1729028766
16+
with list_stream widget","description":null,"author_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","author_name":"CI
17+
Account","layout_type":"ordered","url":"/dashboard/k3w-qcg-ug8/test-createanewdashboardwithllmobservabilitystreamliststreamwidget-1729028766-wi","is_read_only":false,"template_variables":null,"widgets":[{"definition":{"requests":[{"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"}],"query":{"data_source":"llm_observability_stream","indexes":[],"query_string":"@event_type:span
18+
@parent_id:undefined"},"response_format":"event_list"}],"type":"list_stream"},"id":8221646523831060}],"notify_list":null,"created_at":"2024-10-15T21:46:06.954265+00:00","modified_at":"2024-10-15T21:46:06.954265+00:00","restricted_roles":[]}
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/dashboard/k3w-qcg-ug8
34+
response:
35+
body:
36+
string: '{"deleted_dashboard_id":"k3w-qcg-ug8"}
37+
38+
'
39+
headers:
40+
content-type:
41+
- application/json
42+
status:
43+
code: 200
44+
message: OK
45+
version: 1

tests/v1/features/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

0 commit comments

Comments
 (0)