@@ -24,6 +24,7 @@ use test_framework::{
2424 arrow:: util:: pretty:: print_batches,
2525 metrics:: { MetricCollector , NoExtendedMetrics , QueryMetrics , QueryStatus , StatisticsCollector } ,
2626 opentelemetry:: KeyValue ,
27+ opentelemetry_sdk:: Resource ,
2728 spicetest:: { SpiceTest , datasets:: NotStarted } ,
2829 telemetry:: streaming:: StreamingOtlpExporter ,
2930} ;
@@ -115,6 +116,19 @@ pub(crate) async fn run(
115116 adbc_conn : adbc_client:: AdbcConnection ,
116117) -> anyhow:: Result < ( ) > {
117118 scenario. load_query_set ( ) ?;
119+
120+ let load_resource = Resource :: builder_empty ( )
121+ . with_attributes ( vec ! [
122+ KeyValue :: new( "service.name" , "spicebench" ) ,
123+ KeyValue :: new( "type" , "spicebench" ) ,
124+ KeyValue :: new( "adapter_name" , common_args. system_adapter_name. clone( ) ) ,
125+ KeyValue :: new( "scenario" , scenario. to_string( ) ) ,
126+ ] )
127+ . build ( ) ;
128+
129+ // Create telemetry with resource upfront, before any metrics calls
130+ let telemetry = super :: create_telemetry_with_resource ( & common_args, load_resource) ;
131+
118132 // Create the appropriate query executor based on args
119133 let executor = Box :: new ( adbc_executor:: AdbcDirectQueryExecutor :: new ( adbc_conn) ) ;
120134
@@ -261,5 +275,8 @@ pub(crate) async fn run(
261275 }
262276
263277 println ! ( "Benchmark completed" ) ;
278+
279+ telemetry. emit ( ) . await ?;
280+
264281 Ok ( ( ) )
265282}
0 commit comments