@@ -223,6 +223,7 @@ mod span_flags_tests {
223223 use opentelemetry:: InstrumentationScope ;
224224 use opentelemetry_sdk:: trace:: SpanData ;
225225 use std:: borrow:: Cow ;
226+ use std:: sync:: Arc ;
226227
227228 #[ test]
228229 fn test_build_span_flags_local_parent ( ) {
@@ -272,7 +273,7 @@ mod span_flags_tests {
272273 events : opentelemetry_sdk:: trace:: SpanEvents :: default ( ) ,
273274 links : opentelemetry_sdk:: trace:: SpanLinks :: default ( ) ,
274275 status : opentelemetry:: trace:: Status :: Unset ,
275- instrumentation_scope : InstrumentationScope :: builder ( "test" ) . build ( ) ,
276+ instrumentation_scope : Arc :: new ( InstrumentationScope :: builder ( "test" ) . build ( ) ) ,
276277 } ;
277278
278279 let otlp_span: Span = span_data. into ( ) ;
@@ -300,7 +301,7 @@ mod span_flags_tests {
300301 events : opentelemetry_sdk:: trace:: SpanEvents :: default ( ) ,
301302 links : opentelemetry_sdk:: trace:: SpanLinks :: default ( ) ,
302303 status : opentelemetry:: trace:: Status :: Unset ,
303- instrumentation_scope : InstrumentationScope :: builder ( "test" ) . build ( ) ,
304+ instrumentation_scope : Arc :: new ( InstrumentationScope :: builder ( "test" ) . build ( ) ) ,
304305 } ;
305306
306307 let otlp_span: Span = span_data. into ( ) ;
@@ -325,6 +326,7 @@ mod tests {
325326 use opentelemetry_sdk:: trace:: SpanData ;
326327 use opentelemetry_sdk:: trace:: { SpanEvents , SpanLinks } ;
327328 use std:: borrow:: Cow ;
329+ use std:: sync:: Arc ;
328330 use std:: time:: Duration ;
329331
330332 fn create_test_span_data ( instrumentation_name : & ' static str ) -> SpanData {
@@ -349,7 +351,7 @@ mod tests {
349351 events : SpanEvents :: default ( ) ,
350352 links : SpanLinks :: default ( ) ,
351353 status : Status :: Unset ,
352- instrumentation_scope : InstrumentationScope :: builder ( instrumentation_name) . build ( ) ,
354+ instrumentation_scope : Arc :: new ( InstrumentationScope :: builder ( instrumentation_name) . build ( ) ) ,
353355 }
354356 }
355357
@@ -503,7 +505,7 @@ mod tests {
503505 events : SpanEvents :: default ( ) ,
504506 links : SpanLinks :: default ( ) ,
505507 status : Status :: Unset ,
506- instrumentation_scope,
508+ instrumentation_scope : Arc :: new ( instrumentation_scope ) ,
507509 } ;
508510
509511 let resource: ResourceAttributesWithSchema = ( & resource) . into ( ) ;
0 commit comments