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
11 changes: 11 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5807,10 +5807,21 @@ components:
description: Team handle.
type: string
type: array
version:
$ref: "#/components/schemas/ListStreamQueryVersion"
required:
- query_string
- data_source
type: object
ListStreamQueryVersion:
description: |-
Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is
preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.**
enum:
- sequential_query
type: string
x-enum-varnames:
- SEQUENTIAL_QUERY
ListStreamResponseFormat:
description: Widget response format.
enum:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2026-06-30T18:19:26.621Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "Dashboards/Create a new dashboard with logs_transaction_stream list_stream widget and version",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "7d2dcbfd4f2570cd30d2db347a6251ab",
"_order": 0,
"cache": {},
"request": {
"bodySize": 487,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 559,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget_and_version-1782843566 with list_stream widget\",\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"compute\":[{\"aggregation\":\"count\",\"facet\":\"service\"}],\"data_source\":\"logs_transaction_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\",\"version\":\"sequential_query\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"}}]}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard"
},
"response": {
"bodySize": 905,
"content": {
"mimeType": "application/json",
"size": 905,
"text": "{\"id\":\"72a-q2p-zau\",\"title\":\"Test-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget_and_version-1782843566 with list_stream widget\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/72a-q2p-zau/test-createanewdashboardwithlogstransactionstreamliststreamwidgetandversion-1782\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"compute\":[{\"aggregation\":\"count\",\"facet\":\"service\"}],\"data_source\":\"logs_transaction_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\",\"version\":\"sequential_query\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"},\"id\":7740630869906828}],\"notify_list\":null,\"created_at\":\"2026-06-30T18:19:26.794909+00:00\",\"modified_at\":\"2026-06-30T18:19:26.794909+00:00\",\"restricted_roles\":[]}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 380,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2026-06-30T18:19:26.631Z",
"time": 371
},
{
"_id": "6ad9f4e6a51014114aa481cf0551672f",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
}
],
"headersSize": 520,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v1/dashboard/72a-q2p-zau"
},
"response": {
"bodySize": 38,
"content": {
"mimeType": "application/json",
"size": 38,
"text": "{\"deleted_dashboard_id\":\"72a-q2p-zau\"}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 379,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2026-06-30T18:19:27.026Z",
"time": 501
}
],
"pages": [],
"version": "1.2"
}
}
9 changes: 9 additions & 0 deletions features/v1/dashboards.feature
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,15 @@ Feature: Dashboards
And the response "widgets[0].definition.requests[0].query.compute[0].facet" is equal to "service"
And the response "widgets[0].definition.requests[0].query.compute[0].aggregation" is equal to "count"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with logs_transaction_stream list_stream widget and version
Given new "CreateDashboard" request
And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_transaction_stream","query_string":"","group_by":[{"facet":"service"}],"compute":[{"facet":"service","aggregation":"count"}],"version":"sequential_query"},"response_format":"event_list"}]}}]}
When the request is sent
Then the response status is 200 OK
And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_transaction_stream"
And the response "widgets[0].definition.requests[0].query.version" is equal to "sequential_query"

@team:DataDog/dashboards-backend
Scenario: Create a new dashboard with manage_status widget
Given new "CreateDashboard" request
Expand Down
1 change: 1 addition & 0 deletions services/dashboards/src/v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export { ListStreamGroupByItems } from "./models/ListStreamGroupByItems";
export { ListStreamIssuePersona } from "./models/ListStreamIssuePersona";
export { ListStreamIssueState } from "./models/ListStreamIssueState";
export { ListStreamQuery } from "./models/ListStreamQuery";
export { ListStreamQueryVersion } from "./models/ListStreamQueryVersion";
export { ListStreamResponseFormat } from "./models/ListStreamResponseFormat";
export { ListStreamSource } from "./models/ListStreamSource";
export { ListStreamWidgetDefinition } from "./models/ListStreamWidgetDefinition";
Expand Down
10 changes: 10 additions & 0 deletions services/dashboards/src/v1/models/ListStreamQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ListStreamComputeItems } from "./ListStreamComputeItems";
import { ListStreamGroupByItems } from "./ListStreamGroupByItems";
import { ListStreamIssuePersona } from "./ListStreamIssuePersona";
import { ListStreamIssueState } from "./ListStreamIssueState";
import { ListStreamQueryVersion } from "./ListStreamQueryVersion";
import { ListStreamSource } from "./ListStreamSource";
import { WidgetEventSize } from "./WidgetEventSize";
import { WidgetFieldSort } from "./WidgetFieldSort";
Expand Down Expand Up @@ -68,6 +69,11 @@ export class ListStreamQuery {
* Filter by team handles. Usable only with `issue_stream`.
*/
"teamHandles"?: Array<string>;
/**
* Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is
* preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.**
*/
"version"?: ListStreamQueryVersion;
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -141,6 +147,10 @@ export class ListStreamQuery {
baseName: "team_handles",
type: "Array<string>",
},
version: {
baseName: "version",
type: "ListStreamQueryVersion",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
Expand Down
8 changes: 8 additions & 0 deletions services/dashboards/src/v1/models/ListStreamQueryVersion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { UnparsedObject } from "@datadog/datadog-api-client";

/**
* Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is
* preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.**
*/
export type ListStreamQueryVersion = typeof SEQUENTIAL_QUERY | UnparsedObject;
export const SEQUENTIAL_QUERY = "sequential_query";
1 change: 1 addition & 0 deletions services/dashboards/src/v1/models/TypingInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ export const TypingInfo: ModelTypingInfo = {
],
ListStreamIssuePersona: ["all", "browser", "mobile", "backend"],
ListStreamIssueState: ["OPEN", "IGNORED", "ACKNOWLEDGED", "RESOLVED"],
ListStreamQueryVersion: ["sequential_query"],
ListStreamResponseFormat: ["event_list"],
ListStreamSource: [
"logs_stream",
Expand Down
Loading