@@ -54,40 +54,40 @@ fn test_tracing() {
54
54
) ;
55
55
}
56
56
57
- #[ tracing:: instrument( fields( span_field) ) ]
58
- fn function ( ) {
59
- tracing:: Span :: current ( ) . record ( "span_field" , & "some data" ) ;
60
- }
57
+ // #[tracing::instrument(fields(span_field))]
58
+ // fn function() {
59
+ // tracing::Span::current().record("span_field", &"some data");
60
+ // }
61
61
62
- #[ test]
63
- fn test_span_record ( ) {
64
- let _dispatcher = tracing_subscriber:: registry ( )
65
- . with ( sentry_tracing:: layer ( ) )
66
- . set_default ( ) ;
62
+ // #[test]
63
+ // fn test_span_record() {
64
+ // let _dispatcher = tracing_subscriber::registry()
65
+ // .with(sentry_tracing::layer())
66
+ // .set_default();
67
67
68
- let options = sentry:: ClientOptions {
69
- traces_sample_rate : 1.0 ,
70
- ..Default :: default ( )
71
- } ;
68
+ // let options = sentry::ClientOptions {
69
+ // traces_sample_rate: 1.0,
70
+ // ..Default::default()
71
+ // };
72
72
73
- let envelopes = sentry:: test:: with_captured_envelopes_options (
74
- || {
75
- let _span = tracing:: span!( tracing:: Level :: INFO , "span" ) . entered ( ) ;
76
- function ( ) ;
77
- } ,
78
- options,
79
- ) ;
73
+ // let envelopes = sentry::test::with_captured_envelopes_options(
74
+ // || {
75
+ // let _span = tracing::span!(tracing::Level::INFO, "span").entered();
76
+ // function();
77
+ // },
78
+ // options,
79
+ // );
80
80
81
- assert_eq ! ( envelopes. len( ) , 1 ) ;
81
+ // assert_eq!(envelopes.len(), 1);
82
82
83
- let envelope_item = envelopes[ 0 ] . items ( ) . next ( ) . unwrap ( ) ;
84
- let transaction = match envelope_item {
85
- sentry:: protocol:: EnvelopeItem :: Transaction ( t) => t,
86
- _ => panic ! ( "expected only a transaction item" ) ,
87
- } ;
83
+ // let envelope_item = envelopes[0].items().next().unwrap();
84
+ // let transaction = match envelope_item {
85
+ // sentry::protocol::EnvelopeItem::Transaction(t) => t,
86
+ // _ => panic!("expected only a transaction item"),
87
+ // };
88
88
89
- assert_eq ! (
90
- transaction. spans[ 0 ] . data[ "span_field" ] . as_str( ) . unwrap( ) ,
91
- "some data"
92
- ) ;
93
- }
89
+ // assert_eq!(
90
+ // transaction.spans[0].data["span_field"].as_str().unwrap(),
91
+ // "some data"
92
+ // );
93
+ // }
0 commit comments