File tree 2 files changed +5
-19
lines changed
2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ fn test_inner(mod_path: String, mut input: ItemFn) -> syn::Result<TokenStream> {
95
95
let name = input. sig . ident . clone ( ) ;
96
96
let new_block: Block = parse_quote ! {
97
97
{
98
- let _guard = #before_ident( ) . await ;
98
+ #before_ident( ) . await ;
99
99
// Define a function with same name we can instrument inside the
100
100
// tracing enablement logic.
101
101
#[ cfg_attr( feature = "otel" , tracing:: instrument( skip_all) ) ]
@@ -118,7 +118,6 @@ fn test_inner(mod_path: String, mut input: ItemFn) -> syn::Result<TokenStream> {
118
118
input. block = Box :: new ( new_block) ;
119
119
120
120
Ok ( quote ! {
121
- #[ cfg_attr( feature = "otel" , tracing:: instrument( skip_all) ) ]
122
121
#[ :: tokio:: test( flavor = "multi_thread" , worker_threads = 1 ) ]
123
122
#input
124
123
} )
Original file line number Diff line number Diff line change @@ -224,25 +224,12 @@ where
224
224
f ( & rustup_home)
225
225
}
226
226
227
- pub async fn before_test_async ( ) -> Option < tracing :: dispatcher :: DefaultGuard > {
227
+ pub async fn before_test_async ( ) {
228
228
#[ cfg( feature = "otel" ) ]
229
229
{
230
- use tracing_subscriber:: { layer:: SubscriberExt , Registry } ;
231
-
232
- let telemetry = {
233
- use opentelemetry:: global;
234
- use opentelemetry_sdk:: propagation:: TraceContextPropagator ;
235
-
236
- global:: set_text_map_propagator ( TraceContextPropagator :: new ( ) ) ;
237
- crate :: cli:: log:: telemetry ( )
238
- } ;
239
-
240
- let subscriber = Registry :: default ( ) . with ( telemetry) ;
241
- Some ( tracing:: subscriber:: set_default ( subscriber) )
242
- }
243
- #[ cfg( not( feature = "otel" ) ) ]
244
- {
245
- None
230
+ opentelemetry:: global:: set_text_map_propagator (
231
+ opentelemetry_sdk:: propagation:: TraceContextPropagator :: new ( ) ,
232
+ ) ;
246
233
}
247
234
}
248
235
You can’t perform that action at this time.
0 commit comments