@@ -1293,6 +1293,17 @@ def test_preflight(self) -> None:
1293
1293
metrics = [DummyMetric ("test_preflight_metric" , get_value = lambda x : 1 )],
1294
1294
)
1295
1295
1296
+ aggregations = [
1297
+ AttributeAggregation (
1298
+ aggregate = Function .FUNCTION_SUM ,
1299
+ key = AttributeKey (
1300
+ type = AttributeKey .TYPE_FLOAT , name = "test_preflight_metric"
1301
+ ),
1302
+ label = "sum" ,
1303
+ extrapolation_mode = ExtrapolationMode .EXTRAPOLATION_MODE_NONE ,
1304
+ ),
1305
+ ]
1306
+
1296
1307
preflight_message = TimeSeriesRequest (
1297
1308
meta = RequestMeta (
1298
1309
project_ids = [1 , 2 , 3 ],
@@ -1308,22 +1319,35 @@ def test_preflight(self) -> None:
1308
1319
mode = DownsampledStorageConfig .MODE_PREFLIGHT
1309
1320
),
1310
1321
),
1311
- aggregations = [
1312
- AttributeAggregation (
1313
- aggregate = Function .FUNCTION_SUM ,
1314
- key = AttributeKey (
1315
- type = AttributeKey .TYPE_FLOAT , name = "test_preflight_metric"
1316
- ),
1317
- label = "sum" ,
1318
- extrapolation_mode = ExtrapolationMode .EXTRAPOLATION_MODE_NONE ,
1322
+ aggregations = aggregations ,
1323
+ granularity_secs = granularity_secs ,
1324
+ )
1325
+
1326
+ message_to_non_downsampled_tier = TimeSeriesRequest (
1327
+ meta = RequestMeta (
1328
+ project_ids = [1 , 2 , 3 ],
1329
+ organization_id = 1 ,
1330
+ cogs_category = "something" ,
1331
+ referrer = "something" ,
1332
+ start_timestamp = Timestamp (seconds = int (BASE_TIME .timestamp ())),
1333
+ end_timestamp = Timestamp (
1334
+ seconds = int (BASE_TIME .timestamp () + query_duration )
1319
1335
),
1320
- ],
1336
+ trace_item_type = TraceItemType .TRACE_ITEM_TYPE_SPAN ,
1337
+ ),
1338
+ aggregations = aggregations ,
1321
1339
granularity_secs = granularity_secs ,
1322
1340
)
1323
1341
1324
1342
preflight_response = EndpointTimeSeries ().execute (preflight_message )
1343
+ non_downsampled_tier_response = EndpointTimeSeries ().execute (
1344
+ message_to_non_downsampled_tier
1345
+ )
1325
1346
1326
- assert preflight_response .result_timeseries == []
1347
+ assert (
1348
+ len (preflight_response .result_timeseries )
1349
+ < len (non_downsampled_tier_response .result_timeseries ) / 100
1350
+ )
1327
1351
assert (
1328
1352
preflight_response .meta .downsampled_storage_meta
1329
1353
== DownsampledStorageMeta (
0 commit comments