diff --git a/.apigentools-info b/.apigentools-info index 61d5b65e1..5b4ea1ae6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-29 13:20:47.377297", - "spec_repo_commit": "3e55ad68" + "regenerated": "2024-04-01 14:26:16.959295", + "spec_repo_commit": "286f4535" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-29 13:20:47.394748", - "spec_repo_commit": "3e55ad68" + "regenerated": "2024-04-01 14:26:16.982026", + "spec_repo_commit": "286f4535" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 37402f115..8cc4ae134 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -21742,6 +21742,7 @@ components: If the second element is not present, the API returns null.' items: $ref: '#/components/schemas/Unit' + nullable: true type: array type: object TimeseriesResponseSeriesList: diff --git a/examples/v2_metrics_query_timeseries_data_301142940.rs b/examples/v2_metrics_query_timeseries_data_301142940.rs index 26ab22908..0edb15bba 100644 --- a/examples/v2_metrics_query_timeseries_data_301142940.rs +++ b/examples/v2_metrics_query_timeseries_data_301142940.rs @@ -20,7 +20,7 @@ async fn main() { vec![TimeseriesQuery::MetricsTimeseriesQuery(Box::new( MetricsTimeseriesQuery::new( MetricsDataSource::METRICS, - "avg:system.cpu.user{*}".to_string(), + "avg:datadog.estimated_usage.metrics.custom{*}".to_string(), ) .name("a".to_string()), ))], diff --git a/src/datadogV2/model/model_timeseries_response_series.rs b/src/datadogV2/model/model_timeseries_response_series.rs index 20ee750ed..20dd5dacb 100644 --- a/src/datadogV2/model/model_timeseries_response_series.rs +++ b/src/datadogV2/model/model_timeseries_response_series.rs @@ -21,8 +21,8 @@ pub struct TimeseriesResponseSeries { /// The first element describes the "primary unit" (for example, `bytes` in `bytes per second`). /// The second element describes the "per unit" (for example, `second` in `bytes per second`). /// If the second element is not present, the API returns null. - #[serde(rename = "unit")] - pub unit: Option>>, + #[serde(rename = "unit", default, with = "::serde_with::rust::double_option")] + pub unit: Option>>>, #[serde(skip)] #[serde(default)] pub(crate) _unparsed: bool, @@ -48,7 +48,7 @@ impl TimeseriesResponseSeries { self } - pub fn unit(mut self, value: Vec>) -> Self { + pub fn unit(mut self, value: Option>>) -> Self { self.unit = Some(value); self } @@ -79,7 +79,7 @@ impl<'de> Deserialize<'de> for TimeseriesResponseSeries { { let mut group_tags: Option> = None; let mut query_index: Option = None; - let mut unit: Option>> = None; + let mut unit: Option>>> = None; let mut _unparsed = false; while let Some((k, v)) = map.next_entry::()? { @@ -98,9 +98,6 @@ impl<'de> Deserialize<'de> for TimeseriesResponseSeries { Some(serde_json::from_value(v).map_err(M::Error::custom)?); } "unit" => { - if v.is_null() { - continue; - } unit = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } &_ => {} diff --git a/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.frozen index 4cb311f0e..3cfd00936 100644 --- a/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.frozen @@ -1 +1 @@ -2024-03-25T19:28:01.413Z \ No newline at end of file +2024-04-01T14:20:01.994Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.json b/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.json index 00f90c840..dac1e232f 100644 --- a/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/metrics/Timeseries-cross-product-query-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"formulas\":[{\"formula\":\"a\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"from\":1711391281000,\"interval\":5000,\"queries\":[{\"data_source\":\"metrics\",\"name\":\"a\",\"query\":\"avg:system.cpu.user{*}\"}],\"to\":1711394881000},\"type\":\"timeseries_request\"}}", + "string": "{\"data\":{\"attributes\":{\"formulas\":[{\"formula\":\"a\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"from\":1711977601000,\"interval\":5000,\"queries\":[{\"data_source\":\"metrics\",\"name\":\"a\",\"query\":\"avg:datadog.estimated_usage.metrics.custom{*}\"}],\"to\":1711981201000},\"type\":\"timeseries_request\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"0\",\"type\":\"timeseries_response\",\"attributes\":{\"series\":[{\"group_tags\":[],\"query_index\":0,\"unit\":[{\"family\":\"percentage\",\"name\":\"percent\",\"plural\":\"percent\",\"scale_factor\":1.0,\"short_name\":\"%\",\"id\":17},null]}],\"times\":[1711391285000,1711391290000,1711391295000,1711391300000,1711391305000,1711391310000,1711391315000,1711391320000,1711391325000,1711391330000,1711391335000,1711391340000,1711391345000,1711391350000,1711391355000,1711391360000,1711391365000,1711391370000,1711391375000,1711391380000,1711391385000,1711391390000,1711391395000,1711391400000,1711391405000,1711391410000,1711391415000,1711391420000,1711391425000,1711391430000,1711391435000,1711391440000,1711391445000,1711391450000,1711391455000,1711391460000,1711391465000,1711391470000,1711391475000,1711391480000,1711391485000,1711391490000,1711391495000,1711391500000,1711391505000,1711391510000,1711391515000,1711391520000,1711391525000,1711391530000,1711391535000,1711391540000,1711391545000,1711391550000,1711391555000,1711391560000,1711391565000,1711391570000,1711391575000,1711391580000,1711391585000,1711391590000,1711391595000,1711391600000,1711391605000,1711391610000,1711391615000,1711391620000,1711391625000,1711391630000,1711391635000,1711391640000,1711391645000,1711391650000,1711391655000,1711391660000,1711391665000,1711391670000,1711391675000,1711391680000,1711391685000,1711391690000,1711391695000,1711391700000,1711391705000,1711391710000,1711391715000,1711391720000,1711391725000,1711391730000,1711391735000,1711391740000,1711391745000,1711391750000,1711391755000,1711391760000,1711391765000,1711391770000,1711391775000,1711391780000,1711391785000,1711391790000,1711391795000,1711391800000,1711391805000,1711391810000,1711391815000,1711391820000,1711391825000,1711391830000,1711391835000,1711391840000,1711391845000,1711391850000,1711391855000,1711391860000,1711391865000,1711391870000,1711391875000,1711391880000,1711391885000,1711391890000,1711391895000,1711391900000,1711391905000,1711391910000,1711391915000,1711391920000,1711391925000,1711391930000,1711391935000,1711391940000,1711391945000,1711391950000,1711391955000,1711391960000,1711391965000,1711391970000,1711391975000,1711391980000,1711391985000,1711391990000,1711391995000,1711392000000,1711392005000,1711392010000,1711392015000,1711392020000,1711392025000,1711392030000,1711392035000,1711392040000,1711392045000,1711392050000,1711392055000,1711392060000,1711392065000,1711392070000,1711392075000,1711392080000,1711392085000,1711392090000,1711392095000,1711392100000,1711392105000,1711392110000,1711392115000,1711392120000,1711392125000,1711392130000,1711392135000,1711392140000,1711392145000,1711392150000,1711392155000,1711392160000,1711392165000,1711392170000,1711392175000,1711392180000,1711392185000,1711392190000,1711392195000,1711392200000,1711392205000,1711392210000,1711392215000,1711392220000,1711392225000,1711392230000,1711392235000,1711392240000,1711392245000,1711392250000,1711392255000,1711392260000,1711392265000,1711392270000,1711392275000,1711392280000,1711392285000,1711392290000,1711392295000,1711392300000,1711392305000,1711392310000,1711392315000,1711392320000,1711392325000,1711392330000,1711392335000,1711392340000,1711392345000,1711392350000,1711392355000,1711392360000,1711392365000,1711392370000,1711392375000,1711392380000,1711392385000,1711392390000,1711392395000,1711392400000,1711392405000,1711392410000,1711392415000,1711392420000,1711392425000,1711392430000,1711392435000,1711392440000,1711392445000,1711392450000,1711392455000,1711392460000,1711392465000,1711392470000,1711392475000,1711392480000,1711392485000,1711392490000,1711392495000,1711392500000,1711392505000,1711392510000,1711392515000,1711392520000,1711392525000,1711392530000,1711392535000,1711392540000,1711392545000,1711392550000,1711392555000,1711392560000,1711392565000,1711392570000,1711392575000,1711392580000,1711392585000,1711392590000,1711392595000,1711392600000,1711392605000,1711392610000,1711392615000,1711392620000,1711392625000,1711392630000,1711392635000,1711392640000,1711392645000,1711392650000,1711392655000,1711392660000,1711392665000,1711392670000,1711392675000,1711392680000,1711392685000,1711392690000,1711392695000,1711392700000,1711392705000,1711392710000,1711392715000,1711392720000,1711392725000,1711392730000,1711392735000,1711392740000,1711392745000,1711392750000,1711392755000,1711392760000,1711392765000,1711392770000,1711392775000,1711392780000,1711392785000,1711392790000,1711392795000,1711392800000,1711392805000,1711392810000,1711392815000,1711392820000,1711392825000,1711392830000,1711392835000,1711392840000,1711392845000,1711392850000,1711392855000,1711392860000,1711392865000,1711392870000,1711392875000,1711392880000,1711392885000,1711392890000,1711392895000,1711392900000,1711392905000,1711392910000,1711392915000,1711392920000,1711392925000,1711392930000,1711392935000,1711392940000,1711392945000,1711392950000,1711392955000,1711392960000,1711392965000,1711392970000,1711392975000,1711392980000,1711392985000,1711392990000,1711392995000,1711393000000,1711393005000,1711393010000,1711393015000,1711393020000,1711393025000,1711393030000,1711393035000,1711393040000,1711393045000,1711393050000,1711393055000,1711393060000,1711393065000,1711393070000,1711393075000,1711393080000,1711393085000,1711393090000,1711393095000,1711393100000,1711393105000,1711393110000,1711393115000,1711393120000,1711393125000,1711393130000,1711393135000,1711393140000,1711393145000,1711393150000,1711393155000,1711393160000,1711393165000,1711393170000,1711393175000,1711393180000,1711393185000,1711393190000,1711393195000,1711393200000,1711393205000,1711393210000,1711393215000,1711393220000,1711393225000,1711393230000,1711393235000,1711393240000,1711393245000,1711393250000,1711393255000,1711393260000,1711393265000,1711393270000,1711393275000,1711393280000,1711393285000,1711393290000,1711393295000,1711393300000,1711393305000,1711393310000,1711393315000,1711393320000,1711393325000,1711393330000,1711393335000,1711393340000,1711393345000,1711393350000,1711393355000,1711393360000,1711393365000,1711393370000,1711393375000,1711393380000,1711393385000,1711393390000,1711393395000,1711393400000,1711393405000,1711393410000,1711393415000,1711393420000,1711393425000,1711393430000,1711393435000,1711393440000,1711393445000,1711393450000,1711393455000,1711393460000,1711393465000,1711393470000,1711393475000,1711393480000,1711393485000,1711393490000,1711393495000,1711393500000,1711393505000,1711393510000,1711393515000,1711393520000,1711393525000,1711393530000,1711393535000,1711393540000,1711393545000,1711393550000,1711393555000,1711393560000,1711393565000,1711393570000,1711393575000,1711393580000,1711393585000,1711393590000,1711393595000,1711393600000,1711393605000,1711393610000,1711393615000,1711393620000,1711393625000,1711393630000,1711393635000,1711393640000,1711393645000,1711393650000,1711393655000,1711393660000,1711393665000,1711393670000,1711393675000,1711393680000,1711393685000,1711393690000,1711393695000,1711393700000,1711393705000,1711393710000,1711393715000,1711393720000,1711393725000,1711393730000,1711393735000,1711393740000,1711393745000,1711393750000,1711393755000,1711393760000,1711393765000,1711393770000,1711393775000,1711393780000,1711393785000,1711393790000,1711393795000,1711393800000,1711393805000,1711393810000,1711393815000,1711393820000,1711393825000,1711393830000,1711393835000,1711393840000,1711393845000,1711393850000,1711393855000,1711393860000,1711393865000,1711393870000,1711393875000,1711393880000,1711393885000,1711393890000,1711393895000,1711393900000,1711393905000,1711393910000,1711393915000,1711393920000,1711393925000,1711393930000,1711393935000,1711393940000,1711393945000,1711393950000,1711393955000,1711393960000,1711393965000,1711393970000,1711393975000,1711393980000,1711393985000,1711393990000,1711393995000,1711394000000,1711394005000,1711394010000,1711394015000,1711394020000,1711394025000,1711394030000,1711394035000,1711394040000,1711394045000,1711394050000,1711394055000,1711394060000,1711394065000,1711394070000,1711394075000,1711394080000,1711394085000,1711394090000,1711394095000,1711394100000,1711394105000,1711394110000,1711394115000,1711394120000,1711394125000,1711394130000,1711394135000,1711394140000,1711394145000,1711394150000,1711394155000,1711394160000,1711394165000,1711394170000,1711394175000,1711394180000,1711394185000,1711394190000,1711394195000,1711394200000,1711394205000,1711394210000,1711394215000,1711394220000,1711394225000,1711394230000,1711394235000,1711394240000,1711394245000,1711394250000,1711394255000,1711394260000,1711394265000,1711394270000,1711394275000,1711394280000,1711394285000,1711394290000,1711394295000,1711394300000,1711394305000,1711394310000,1711394315000,1711394320000,1711394325000,1711394330000,1711394335000,1711394340000,1711394345000,1711394350000,1711394355000,1711394360000,1711394365000,1711394370000,1711394375000,1711394380000,1711394385000,1711394390000,1711394395000,1711394400000,1711394405000,1711394410000,1711394415000,1711394420000,1711394425000,1711394430000,1711394435000,1711394440000,1711394445000,1711394450000,1711394455000,1711394460000,1711394465000,1711394470000,1711394475000,1711394480000,1711394485000,1711394490000,1711394495000,1711394500000,1711394505000,1711394510000,1711394515000,1711394520000,1711394525000,1711394530000,1711394535000,1711394540000,1711394545000,1711394550000,1711394555000,1711394560000,1711394565000,1711394570000,1711394575000,1711394580000,1711394585000,1711394590000,1711394595000,1711394600000,1711394605000,1711394610000,1711394615000,1711394620000,1711394625000,1711394630000,1711394635000,1711394640000,1711394645000,1711394650000,1711394655000,1711394660000,1711394665000,1711394670000,1711394675000,1711394680000,1711394685000,1711394690000,1711394695000,1711394700000,1711394705000,1711394710000,1711394715000,1711394720000,1711394725000,1711394730000,1711394735000,1711394740000,1711394745000,1711394750000,1711394755000,1711394760000,1711394765000,1711394770000,1711394775000,1711394780000,1711394785000,1711394790000,1711394795000,1711394800000,1711394805000,1711394810000,1711394815000,1711394820000,1711394825000,1711394830000,1711394835000,1711394840000,1711394845000,1711394850000,1711394855000,1711394860000,1711394865000,1711394870000],\"values\":[[6.55287,7.653691,8.074132,8.520207,8.950907,7.916871,6.845938,5.784219,5.762797,5.722131,5.700021,6.712083,7.735711,8.718965,8.647128,8.618138,8.631143,7.508192,6.349665,5.15687,4.875612,4.590749,4.36225,4.410917,4.470273,4.464474,4.47251,4.483163,4.526445,5.54599,6.554316,7.540337,7.980483,8.411913,8.864231,7.938047,7.036249,6.123346,5.537604,4.962874,4.388964,5.62566,6.829512,8.015378,8.28254,8.55026,8.860581,8.545143,8.246304,7.931529,6.798313,5.681455,4.568322,4.518803,4.456283,4.368418,4.382031,4.350809,4.352034,5.329423,6.369169,7.392067,7.896939,8.404066,8.910286,7.965594,6.963133,5.961138,5.42918,4.90941,4.414113,4.649018,4.902071,5.105621,6.332659,7.610821,8.922341,8.898437,8.80314,8.685149,7.466139,6.262249,5.1134,4.928292,4.728651,4.45272,4.37289,4.34356,4.353946,5.417275,6.420961,7.427046,7.860038,8.362085,8.846129,8.470399,8.010846,7.580161,6.48361,5.464331,4.433208,4.482254,4.48915,4.463588,5.579319,6.68686,7.845144,8.116063,8.405417,8.678922,8.138011,7.626169,7.083401,6.156783,5.185768,4.256687,4.30854,4.37798,4.442198,4.936679,5.414502,5.892416,6.938129,8.00889,9.039992,8.824517,8.619879,8.434994,7.11902,5.78079,4.472716,4.489653,4.465424,4.39248,4.890352,5.439348,6.027229,6.921446,7.814649,8.6935,8.568899,8.425471,8.307686,7.116616,5.913049,4.682199,4.561133,4.498393,4.434868,4.636073,4.805958,4.954204,6.265438,7.546743,8.872075,8.841947,8.839367,8.809959,7.512406,6.209953,4.933889,4.719156,4.531986,4.310331,4.487775,4.597104,4.705483,5.994278,7.346673,8.726554,8.698727,8.6721,8.647115,7.539949,6.394882,5.217714,4.860702,4.504718,4.18382,4.190516,4.201995,4.210051,5.608884,7.058564,8.487931,8.606586,8.673956,8.746683,7.591944,6.407636,5.243577,4.943366,4.720012,4.483864,4.470364,4.435362,4.371248,5.535527,6.679401,7.845218,8.123638,8.373883,8.653149,7.766131,6.908943,5.995648,5.362087,4.734818,4.167783,4.18285,4.199257,4.1612,5.317815,6.469075,7.639935,7.99583,8.351382,8.730242,8.096467,7.486471,6.847704,6.041489,5.202998,4.364881,4.302514,4.225574,4.17467,5.086185,6.035796,6.984263,7.543073,8.106685,8.646899,8.159914,7.675962,7.1741,6.20745,5.188112,4.240842,4.357332,4.507558,4.597941,5.162082,5.723069,6.274955,7.071972,7.884833,8.723491,8.185493,7.652098,7.145231,6.27026,5.330608,4.343209,4.275416,4.283048,4.328541,4.893022,5.438933,5.932116,6.856302,7.719097,8.648765,8.450491,8.308382,8.115135,6.848305,5.598326,4.371135,4.323282,4.235822,4.133405,4.684965,5.239409,5.813119,6.764066,7.735448,8.701841,8.451185,8.203658,7.970288,6.76796,5.565326,4.313674,4.345033,4.340353,4.375415,4.588976,4.846228,5.117172,6.313084,7.500014,8.65513,8.630696,8.596814,8.566877,7.544596,6.508566,5.489238,5.094146,4.702236,4.278225,4.637965,5.037081,5.462816,6.594993,7.693301,8.774669,8.597579,8.408663,8.251021,6.909035,5.591879,4.26389,4.312984,4.348797,4.355346,4.271229,4.221614,4.20647,5.422305,6.580355,7.743088,8.065408,8.416439,8.720027,7.809973,6.919683,6.079457,5.476187,4.846562,4.154208,4.340759,4.510317,4.72982,6.081959,7.474143,8.869282,8.861762,8.829998,8.775999,7.616932,6.503133,5.399307,5.039438,4.620613,4.206029,4.233881,4.288792,4.341806,5.228727,6.096485,6.96102,7.519905,8.1344,8.742778,7.97381,7.106694,6.254717,5.564684,4.964742,4.374486,4.392372,4.389839,4.354613,5.531295,6.706646,7.90208,8.236722,8.565095,8.912718,7.755613,6.545762,5.26906,4.877972,4.555235,4.277822,4.278287,4.251753,4.238704,5.085358,5.929505,6.777766,7.455351,8.154942,8.801514,8.50602,8.224336,7.973812,6.781706,5.538169,4.296319,4.298864,4.320974,4.358669,5.575296,6.805351,7.999864,8.285327,8.548738,8.859292,7.934174,7.038956,6.09062,5.503341,4.874503,4.29541,4.306759,4.350592,4.381503,4.715551,5.046754,5.357442,6.476053,7.606524,8.716693,8.547975,8.342363,8.192156,6.889573,5.590755,4.283806,4.299666,4.329158,4.333509,5.196667,6.081572,6.929909,7.54685,8.147047,8.816019,7.941241,7.047433,6.147522,5.600144,5.106241,4.573835,4.509756,4.395318,4.286416,4.444419,4.611106,4.824444,6.122412,7.412928,8.634199,8.621294,8.628215,8.700702,7.360761,6.009012,4.616959,4.515799,4.430101,4.359378,5.281752,6.185089,7.084642,7.683872,8.317513,8.958738,8.289596,7.594747,6.889688,6.060589,5.207318,4.36261,4.335867,4.311897,4.254346,4.208211,4.209002,4.285226,5.693424,7.096555,8.419859,8.541253,8.604624,8.711219,7.599701,6.54281,5.467669,5.265288,5.038801,4.805292,5.256932,5.73219,6.218552,7.089647,7.985044,8.907423,8.656572,8.297088,7.904344,6.627018,5.428397,4.248557,4.238079,4.218168,4.193824,4.218451,4.245347,4.281994,5.445491,6.591823,7.719787,8.08122,8.471069,8.863131,7.943765,7.01084,6.054961,5.426395,4.794137,4.196648,4.6802,5.145695,5.583533,6.608606,7.657252,8.760262,8.530168,8.315657,8.044949,6.782988,5.491626,4.222012,4.25429,4.283192,4.318392,4.349969,4.405831,4.449581,5.289619,6.120499,6.950839,7.526146,8.09365,8.673758,8.001265,7.328003,6.634252,5.871918,5.144225,4.46314,4.706678,4.905918,5.02721,6.252528,7.506812,8.82573,8.71739,8.571519,8.403032,7.012094,5.669705,4.323215,4.313149,4.266452,4.207524,4.168038,4.156169,4.208825,5.108547,5.96337,6.722343,7.33471,7.99203,8.696279,8.265813,7.828662,7.404355,6.357447,5.307247,4.255423,4.448251,4.625991,4.783687,6.099444,7.425925,8.79975,8.83416,8.876582,8.850235,7.699996,6.550413,5.462984,5.179607,4.872423,4.514908,4.411737,4.337287,4.266246,4.703951,5.108707,5.545221,6.574182,7.627703,8.682351,8.478338,8.26913,8.02325,6.791308,5.580464,4.414344,4.403699,4.340593,4.219891,5.283474,6.421546,7.647939,8.116389,8.501592,8.792967,7.851637,6.972738,6.141014,5.522508,4.891029,4.232021,4.238359,4.234858,4.293727,4.659333,5.041524,5.367129,6.56142,7.717413,8.868728,8.783005,8.72051,8.673917,7.221307,5.764627,4.367585,4.405773,4.434185,4.338866,5.239748,6.163725,7.187514,7.749678,8.305646,8.818684,8.029843,7.23324,6.440727,5.736626,5.025259,4.310854,4.298465,4.316402,4.371078,4.423943,4.450209,4.411293,5.831356,7.236536,8.696201,8.712155,8.735479,8.751808,7.355808,6.004994,4.635165,4.477936,4.282905,4.074044,4.900497,5.722819,6.593585,7.264512,7.946762,8.599139,8.292311,8.037121,7.774327,6.643144,5.446549,4.231448,4.327076,4.434172,4.62291,4.581124,4.520663,4.37928,5.748617,7.158479,8.614574,8.696535,8.752038,8.74956,7.39657,6.087052,4.838714,4.709822,4.518435,4.30757,4.693932,5.113028,5.538374,6.676559,7.795333,8.873308,8.672464,8.517953,8.442273,7.164625,5.80941,4.376964,4.300379,4.304464,4.341712,4.346123,4.316196,4.281218,4.279323,4.277169]]}}}", + "string": "{\"data\":{\"id\":\"0\",\"type\":\"timeseries_response\",\"attributes\":{\"series\":[{\"group_tags\":[],\"query_index\":0,\"unit\":null}],\"times\":[1711977645000,1711977705000,1711980225000],\"values\":[[1,1,87]]}}}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "OK" } }, - "recorded_at": "Mon, 25 Mar 2024 19:28:01 GMT" + "recorded_at": "Mon, 01 Apr 2024 14:20:01 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v2/metrics.feature b/tests/scenarios/features/v2/metrics.feature index 52bd740c1..033fe70ef 100644 --- a/tests/scenarios/features/v2/metrics.feature +++ b/tests/scenarios/features/v2/metrics.feature @@ -385,11 +385,10 @@ Feature: Metrics Given a valid "appKeyAuth" key in the system And operation "QueryTimeseriesData" enabled And new "QueryTimeseriesData" request - And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "timeseries_response" - And the response "data.attributes.series[0].unit[0].name" is equal to "percent" @generated @skip @team:DataDog/metrics-experience Scenario: Update a tag configuration returns "Bad Request" response