Skip to content

Commit 4c49a56

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add OpenAPI spec for RUM insight aggregation endpoints (#1625)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a2b3373 commit 4c49a56

50 files changed

Lines changed: 8130 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 1436 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Query aggregated long tasks returns "Successful response" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_rum_insights::RUMInsightsAPI;
4+
use datadog_api_client::datadogV2::model::AggregatedLongTasksRequest;
5+
use datadog_api_client::datadogV2::model::AggregatedLongTasksRequestAttributes;
6+
use datadog_api_client::datadogV2::model::AggregatedLongTasksRequestData;
7+
use datadog_api_client::datadogV2::model::AggregatedLongTasksRequestType;
8+
use datadog_api_client::datadogV2::model::AggregatedWaterfallPerformanceCriteria;
9+
use datadog_api_client::datadogV2::model::AggregatedWaterfallPerformanceCriteriaMetric;
10+
11+
#[tokio::main]
12+
async fn main() {
13+
let body = AggregatedLongTasksRequest::new(AggregatedLongTasksRequestData::new(
14+
AggregatedLongTasksRequestAttributes::new(
15+
"ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b".to_string(),
16+
1762437564,
17+
20,
18+
1762523964,
19+
"/account/login(/:type)".to_string(),
20+
)
21+
.criteria(
22+
AggregatedWaterfallPerformanceCriteria::new(
23+
AggregatedWaterfallPerformanceCriteriaMetric::LARGEST_CONTENTFUL_PAINT,
24+
)
25+
.max(5.0 as f64)
26+
.min(2.5 as f64),
27+
)
28+
.filter("@session.type:user".to_string()),
29+
AggregatedLongTasksRequestType::AGGREGATED_LONG_TASKS,
30+
));
31+
let mut configuration = datadog::Configuration::new();
32+
configuration.set_unstable_operation_enabled("v2.QueryAggregatedLongTasks", true);
33+
let api = RUMInsightsAPI::with_config(configuration);
34+
let resp = api.query_aggregated_long_tasks(body).await;
35+
if let Ok(value) = resp {
36+
println!("{:#?}", value);
37+
} else {
38+
println!("{:#?}", resp.unwrap_err());
39+
}
40+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Query aggregated signals and problems returns "Successful response" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_rum_insights::RUMInsightsAPI;
4+
use datadog_api_client::datadogV2::model::AggregatedSignalsProblemsRequest;
5+
use datadog_api_client::datadogV2::model::AggregatedSignalsProblemsRequestAttributes;
6+
use datadog_api_client::datadogV2::model::AggregatedSignalsProblemsRequestData;
7+
use datadog_api_client::datadogV2::model::AggregatedSignalsProblemsRequestType;
8+
use datadog_api_client::datadogV2::model::AggregatedWaterfallPerformanceCriteria;
9+
use datadog_api_client::datadogV2::model::AggregatedWaterfallPerformanceCriteriaMetric;
10+
11+
#[tokio::main]
12+
async fn main() {
13+
let body = AggregatedSignalsProblemsRequest::new(AggregatedSignalsProblemsRequestData::new(
14+
AggregatedSignalsProblemsRequestAttributes::new(
15+
"ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b".to_string(),
16+
1762437564,
17+
30,
18+
1762523964,
19+
"/account/login(/:type)".to_string(),
20+
)
21+
.criteria(
22+
AggregatedWaterfallPerformanceCriteria::new(
23+
AggregatedWaterfallPerformanceCriteriaMetric::LARGEST_CONTENTFUL_PAINT,
24+
)
25+
.max(5.0 as f64)
26+
.min(2.5 as f64),
27+
)
28+
.detection_types(vec![
29+
"high_script_evaluations".to_string(),
30+
"uncompressed_resources".to_string(),
31+
])
32+
.filter("@session.type:user".to_string()),
33+
AggregatedSignalsProblemsRequestType::AGGREGATED_SIGNALS_PROBLEMS,
34+
));
35+
let mut configuration = datadog::Configuration::new();
36+
configuration.set_unstable_operation_enabled("v2.QueryAggregatedSignalsProblems", true);
37+
let api = RUMInsightsAPI::with_config(configuration);
38+
let resp = api.query_aggregated_signals_problems(body).await;
39+
if let Ok(value) = resp {
40+
println!("{:#?}", value);
41+
} else {
42+
println!("{:#?}", resp.unwrap_err());
43+
}
44+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Query aggregated waterfall returns "Successful response" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_rum_insights::RUMInsightsAPI;
4+
use datadog_api_client::datadogV2::model::AggregatedWaterfallPerformanceCriteria;
5+
use datadog_api_client::datadogV2::model::AggregatedWaterfallPerformanceCriteriaMetric;
6+
use datadog_api_client::datadogV2::model::AggregatedWaterfallRequest;
7+
use datadog_api_client::datadogV2::model::AggregatedWaterfallRequestAttributes;
8+
use datadog_api_client::datadogV2::model::AggregatedWaterfallRequestData;
9+
use datadog_api_client::datadogV2::model::AggregatedWaterfallRequestType;
10+
11+
#[tokio::main]
12+
async fn main() {
13+
let body = AggregatedWaterfallRequest::new(AggregatedWaterfallRequestData::new(
14+
AggregatedWaterfallRequestAttributes::new(
15+
"ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b".to_string(),
16+
1762437564,
17+
20,
18+
1762523964,
19+
"/account/login(/:type)".to_string(),
20+
)
21+
.criteria(
22+
AggregatedWaterfallPerformanceCriteria::new(
23+
AggregatedWaterfallPerformanceCriteriaMetric::LARGEST_CONTENTFUL_PAINT,
24+
)
25+
.max(5.0 as f64)
26+
.min(2.5 as f64),
27+
)
28+
.filter("@session.type:user".to_string())
29+
.include_global_appearance(false),
30+
AggregatedWaterfallRequestType::AGGREGATED_WATERFALL,
31+
));
32+
let mut configuration = datadog::Configuration::new();
33+
configuration.set_unstable_operation_enabled("v2.QueryAggregatedWaterfall", true);
34+
let api = RUMInsightsAPI::with_config(configuration);
35+
let resp = api.query_aggregated_waterfall(body).await;
36+
if let Ok(value) = resp {
37+
println!("{:#?}", value);
38+
} else {
39+
println!("{:#?}", resp.unwrap_err());
40+
}
41+
}

src/datadog/configuration.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ impl Default for Configuration {
587587
("v2.update_connection".to_owned(), false),
588588
("v2.get_pruned_trace_by_id".to_owned(), false),
589589
("v2.get_trace_by_id".to_owned(), false),
590+
("v2.query_aggregated_long_tasks".to_owned(), false),
591+
("v2.query_aggregated_signals_problems".to_owned(), false),
592+
("v2.query_aggregated_waterfall".to_owned(), false),
590593
("v2.create_scorecard_outcomes_batch".to_owned(), false),
591594
("v2.list_entity_risk_scores".to_owned(), false),
592595
("v2.create_incident_service".to_owned(), false),

0 commit comments

Comments
 (0)