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
20 changes: 17 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36996,7 +36996,11 @@ components:
attributes:
$ref: "#/components/schemas/FlakyTestAttributes"
id:
description: Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. On the Test Runs UI it is the same as the `test_fingerprint_fqn` tag.
description: |-
Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. It is the
value of the `@test.fingerprint_fqn` facet on test events, which you can search on in the Test
Optimization Explorer to locate a specific test. To filter search results by this ID, use the
`fingerprint_fqn` search key.
type: string
type:
$ref: "#/components/schemas/FlakyTestType"
Expand Down Expand Up @@ -37378,6 +37382,9 @@ components:
- `@git.branch`
- `@test.codeowners`
- `env`
- `fingerprint_fqn`

Use `fingerprint_fqn` to filter by a test's stable Fingerprint FQN (the same value as the test's `id`).
example: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"'
type: string
type: object
Expand Down Expand Up @@ -106707,7 +106714,11 @@ components:
description: Details of what tests to update and their new attributes.
properties:
id:
description: The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events.
description: |-
The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and is the
value of the `@test.fingerprint_fqn` facet on test events. You can find it by searching on
`@test.fingerprint_fqn` in the Test Optimization Explorer, or by filtering the Search flaky tests
endpoint with the `fingerprint_fqn` key.
example: 4eb1887a8adb1847
type: string
new_state:
Expand Down Expand Up @@ -106777,7 +106788,10 @@ components:
description: Error message if the update failed.
type: string
id:
description: The ID of the flaky test from the request. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events.
description: |-
The ID of the flaky test from the request. This is the value of the `@test.fingerprint_fqn` facet
on test events, the same ID accepted by the update request and returned by the Search flaky tests
endpoint.
example: 4eb1887a8adb1847
type: string
success:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-06-30T18:19:26.621Z

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

44 changes: 44 additions & 0 deletions examples/v1/dashboards/CreateDashboard_153558925.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Create a new dashboard with logs_transaction_stream list_stream widget and version

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

body = DatadogAPIClient::V1::Dashboard.new({
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
title: "Example-Dashboard with list_stream widget",
widgets: [
DatadogAPIClient::V1::Widget.new({
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
requests: [
DatadogAPIClient::V1::ListStreamWidgetRequest.new({
columns: [
DatadogAPIClient::V1::ListStreamColumn.new({
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
field: "timestamp",
}),
],
query: DatadogAPIClient::V1::ListStreamQuery.new({
data_source: DatadogAPIClient::V1::ListStreamSource::LOGS_TRANSACTION_STREAM,
query_string: "",
group_by: [
DatadogAPIClient::V1::ListStreamGroupByItems.new({
facet: "service",
}),
],
compute: [
DatadogAPIClient::V1::ListStreamComputeItems.new({
facet: "service",
aggregation: DatadogAPIClient::V1::ListStreamComputeAggregation::COUNT,
}),
],
version: DatadogAPIClient::V1::ListStreamQueryVersion::SEQUENTIAL_QUERY,
}),
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
}),
],
}),
}),
],
})
p api_instance.create_dashboard(body)
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 lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def overrides
"v1.list_stream_issue_persona" => "ListStreamIssuePersona",
"v1.list_stream_issue_state" => "ListStreamIssueState",
"v1.list_stream_query" => "ListStreamQuery",
"v1.list_stream_query_version" => "ListStreamQueryVersion",
"v1.list_stream_response_format" => "ListStreamResponseFormat",
"v1.list_stream_source" => "ListStreamSource",
"v1.list_stream_widget_definition" => "ListStreamWidgetDefinition",
Expand Down
17 changes: 14 additions & 3 deletions lib/datadog_api_client/v1/models/list_stream_query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ class ListStreamQuery
# Filter by team handles. Usable only with `issue_stream`.
attr_accessor :team_handles

# 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.**
attr_accessor :version

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
Expand All @@ -82,7 +86,8 @@ def self.attribute_map
:'states' => :'states',
:'storage' => :'storage',
:'suspected_causes' => :'suspected_causes',
:'team_handles' => :'team_handles'
:'team_handles' => :'team_handles',
:'version' => :'version'
}
end

Expand All @@ -103,7 +108,8 @@ def self.openapi_types
:'states' => :'Array<ListStreamIssueState>',
:'storage' => :'String',
:'suspected_causes' => :'Array<String>',
:'team_handles' => :'Array<String>'
:'team_handles' => :'Array<String>',
:'version' => :'ListStreamQueryVersion'
}
end

Expand Down Expand Up @@ -194,6 +200,10 @@ def initialize(attributes = {})
self.team_handles = value
end
end

if attributes.key?(:'version')
self.version = attributes[:'version']
end
end

# Check to see if the all the properties in the model are valid
Expand Down Expand Up @@ -291,14 +301,15 @@ def ==(o)
storage == o.storage &&
suspected_causes == o.suspected_causes &&
team_handles == o.team_handles &&
version == o.version &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[assignee_uuids, clustering_pattern_field_path, compute, data_source, event_size, group_by, indexes, persona, query_string, sort, states, storage, suspected_causes, team_handles, additional_properties].hash
[assignee_uuids, clustering_pattern_field_path, compute, data_source, event_size, group_by, indexes, persona, query_string, sort, states, storage, suspected_causes, team_handles, version, additional_properties].hash
end
end
end
27 changes: 27 additions & 0 deletions lib/datadog_api_client/v1/models/list_stream_query_version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
=begin
#Datadog API V1 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V1
# 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.**
class ListStreamQueryVersion
include BaseEnumModel

SEQUENTIAL_QUERY = "sequential_query".freeze
end
end
5 changes: 4 additions & 1 deletion lib/datadog_api_client/v2/models/flaky_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class FlakyTest
# Attributes of a flaky test.
attr_accessor :attributes

# Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. On the Test Runs UI it is the same as the `test_fingerprint_fqn` tag.
# Test's ID. This ID is the hash of the test's Fully Qualified Name and Git repository ID. It is the
# value of the `@test.fingerprint_fqn` facet on test events, which you can search on in the Test
# Optimization Explorer to locate a specific test. To filter search results by this ID, use the
# `fingerprint_fqn` search key.
attr_accessor :id

# The type of the flaky test from Flaky Test Management.
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/v2/models/flaky_tests_search_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class FlakyTestsSearchFilter
# - `@git.branch`
# - `@test.codeowners`
# - `env`
# - `fingerprint_fqn`
#
# Use `fingerprint_fqn` to filter by a test's stable Fingerprint FQN (the same value as the test's `id`).
attr_accessor :query

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ module DatadogAPIClient::V2
class UpdateFlakyTestsRequestTest
include BaseGenericModel

# The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events.
# The ID of the flaky test. This is the same ID returned by the Search flaky tests endpoint and is the
# value of the `@test.fingerprint_fqn` facet on test events. You can find it by searching on
# `@test.fingerprint_fqn` in the Test Optimization Explorer, or by filtering the Search flaky tests
# endpoint with the `fingerprint_fqn` key.
attr_reader :id

# The new state to set for the flaky test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class UpdateFlakyTestsResponseResult
# Error message if the update failed.
attr_accessor :error

# The ID of the flaky test from the request. This is the same ID returned by the Search flaky tests endpoint and corresponds to the test_fingerprint_fqn field in test run events.
# The ID of the flaky test from the request. This is the value of the `@test.fingerprint_fqn` facet
# on test events, the same ID accepted by the update request and returned by the Search flaky tests
# endpoint.
attr_reader :id

# `True` if the update was successful, `False` if there were any errors.
Expand Down
Loading