Skip to content

Commit 46675f7

Browse files
committed
more test fixes and snapshot updates
1 parent c84d9b4 commit 46675f7

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

relay-event-schema/src/protocol/contexts/trace.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ mod tests {
206206
},
207207
"links": [
208208
{
209-
"trace_id": "4c79f60c11214eb38604f4ae0781bfb2",
210-
"span_id": "fa90fdead5f74052",
211-
"parent_span_id": "fa90fdead5f74053",
209+
"trace_id": "3c79f60c11214eb38604f4ae0781bfb2",
210+
"span_id": "ea90fdead5f74052",
211+
"parent_span_id": "ea90fdead5f74053",
212212
"sampled": true,
213213
"attributes": {
214-
"sentry.link.type": "previous_trace"
214+
"sentry.link.type": "previous_trace"
215215
}
216216
}
217217
],
@@ -250,9 +250,9 @@ mod tests {
250250
..Default::default()
251251
}),
252252
links: Annotated::new(Array::from(vec![Annotated::new(SpanLink {
253-
trace_id: Annotated::new(TraceId("4c79f60c11214eb38604f4ae0781bfb2".into())),
254-
span_id: Annotated::new(SpanId("fa90fdead5f74052".into())),
255-
parent_span_id: Annotated::new(SpanId("fa90fdead5f74052".into())),
253+
trace_id: Annotated::new(TraceId("3c79f60c11214eb38604f4ae0781bfb2".into())),
254+
span_id: Annotated::new(SpanId("ea90fdead5f74052".into())),
255+
parent_span_id: Annotated::new(SpanId("ea90fdead5f74053".into())),
256256
sampled: Annotated::new(true),
257257
attributes: Annotated::new({
258258
let mut map: std::collections::BTreeMap<String, Annotated<Value>> =

relay-server/src/metrics_extraction/snapshots/relay_server__metrics_extraction__event__tests__extract_span_metrics_mobile.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
2828
origin: ~,
2929
profile_id: ~,
3030
data: ~,
31+
links: ~,
3132
sentry_tags: SentryTags {
3233
release: "1.2.3",
3334
user: "id:user123",
@@ -185,6 +186,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
185186
lcp_url: ~,
186187
other: {},
187188
},
189+
links: ~,
188190
sentry_tags: SentryTags {
189191
release: "1.2.3",
190192
user: "id:user123",
@@ -286,6 +288,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
286288
origin: ~,
287289
profile_id: ~,
288290
data: ~,
291+
links: ~,
289292
sentry_tags: SentryTags {
290293
release: "1.2.3",
291294
user: "id:user123",
@@ -366,6 +369,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
366369
origin: ~,
367370
profile_id: ~,
368371
data: ~,
372+
links: ~,
369373
sentry_tags: SentryTags {
370374
release: "1.2.3",
371375
user: "id:user123",
@@ -446,6 +450,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
446450
origin: ~,
447451
profile_id: ~,
448452
data: ~,
453+
links: ~,
449454
sentry_tags: SentryTags {
450455
release: "1.2.3",
451456
user: "id:user123",
@@ -526,6 +531,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
526531
origin: ~,
527532
profile_id: ~,
528533
data: ~,
534+
links: ~,
529535
sentry_tags: SentryTags {
530536
release: "1.2.3",
531537
user: "id:user123",
@@ -677,6 +683,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
677683
lcp_url: ~,
678684
other: {},
679685
},
686+
links: ~,
680687
sentry_tags: SentryTags {
681688
release: "1.2.3",
682689
user: "id:user123",
@@ -828,6 +835,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
828835
lcp_url: ~,
829836
other: {},
830837
},
838+
links: ~,
831839
sentry_tags: SentryTags {
832840
release: "1.2.3",
833841
user: "id:user123",
@@ -908,6 +916,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
908916
origin: ~,
909917
profile_id: ~,
910918
data: ~,
919+
links: ~,
911920
sentry_tags: SentryTags {
912921
release: "1.2.3",
913922
user: "id:user123",
@@ -1059,6 +1068,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
10591068
lcp_url: ~,
10601069
other: {},
10611070
},
1071+
links: ~,
10621072
sentry_tags: SentryTags {
10631073
release: "1.2.3",
10641074
user: "id:user123",
@@ -1210,6 +1220,7 @@ expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
12101220
lcp_url: ~,
12111221
other: {},
12121222
},
1223+
links: ~,
12131224
sentry_tags: SentryTags {
12141225
release: "1.2.3",
12151226
user: "id:user123",

relay-server/src/metrics_extraction/transactions/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ mod tests {
616616
};
617617

618618
let extracted = extractor.extract(event.value().unwrap()).unwrap();
619-
insta::assert_debug_snapshot!(event.value().unwrap().spans, @r###"
619+
insta::assert_debug_snapshot!(event.value().unwrap().spans, @r#"
620620
[
621621
Span {
622622
timestamp: Timestamp(
@@ -644,6 +644,7 @@ mod tests {
644644
origin: ~,
645645
profile_id: ~,
646646
data: ~,
647+
links: ~,
647648
sentry_tags: ~,
648649
received: ~,
649650
measurements: ~,
@@ -652,7 +653,7 @@ mod tests {
652653
other: {},
653654
},
654655
]
655-
"###);
656+
"#);
656657

657658
insta::assert_debug_snapshot!(extracted.project_metrics, @r###"
658659
[

relay-spans/src/span.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ mod tests {
537537
let otel_span: OtelSpan = serde_json::from_str(json).unwrap();
538538
let span_from_otel = otel_to_sentry_span(otel_span);
539539

540-
insta::assert_debug_snapshot!(span_from_otel, @r###"
540+
insta::assert_debug_snapshot!(span_from_otel, @r#"
541541
Span {
542542
timestamp: Timestamp(
543543
1970-01-01T00:02:03.500Z,
@@ -639,14 +639,15 @@ mod tests {
639639
lcp_url: ~,
640640
other: {},
641641
},
642+
links: ~,
642643
sentry_tags: ~,
643644
received: ~,
644645
measurements: ~,
645646
platform: "php",
646647
was_transaction: ~,
647648
other: {},
648649
}
649-
"###);
650+
"#);
650651
}
651652

652653
#[test]

0 commit comments

Comments
 (0)