Skip to content

Commit c622bf1

Browse files
committed
disable test for field recording
1 parent a5f2bcb commit c622bf1

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

sentry/tests/test_tracing.rs

+31-31
Original file line numberDiff line numberDiff line change
@@ -54,40 +54,40 @@ fn test_tracing() {
5454
);
5555
}
5656

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+
// }
6161

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();
6767

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+
// };
7272

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+
// );
8080

81-
assert_eq!(envelopes.len(), 1);
81+
// assert_eq!(envelopes.len(), 1);
8282

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+
// };
8888

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

Comments
 (0)