You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/default/manual_spans.feature
+17-22Lines changed: 17 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,13 @@ Feature: Manual creation of spans
5
5
Scenario: Retry a manual span
6
6
Given I set the HTTP status code for the next requests to 200,500,200,200
7
7
And I run "RetryScenario"
8
-
And I wait to receive at least 1 span
9
-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
8
+
And I wait to receive a span named "WillRetry"
9
+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
10
10
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
11
-
* a span field "name" equals "WillRetry"
12
11
Then I discard the oldest trace
13
12
And I invoke "step2"
14
-
And I wait to receive at least 2 spans
15
-
* a span field "name" equals "WillRetry"
16
-
* a span field "name" equals "Success"
13
+
And I wait to receive a span named "WillRetry"
14
+
And I wait to receive a span named "Success"
17
15
* every span bool attribute "bugsnag.span.first_class" is true
18
16
* every span string attribute "bugsnag.span.category" equals "custom"
19
17
@@ -55,7 +53,7 @@ Feature: Manual creation of spans
55
53
And I wait to receive at least 1 span
56
54
Then the trace "Content-Type" header equals "application/json"
57
55
* the trace "Bugsnag-Integrity" header matches the regex "^sha1 [A-Fa-f0-9]{40}$"
58
-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
56
+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
59
57
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
60
58
* every span field "name" equals "ManualSpanEndOnDestroyScenario"
61
59
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
@@ -84,7 +82,7 @@ Feature: Manual creation of spans
84
82
Scenario: Starting and ending a span before starting the SDK
85
83
Given I run "ManualSpanBeforeStartScenario"
86
84
And I wait to receive at least 1 span
87
-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
85
+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
88
86
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
89
87
* every span field "name" equals "BeforeStart"
90
88
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
@@ -138,7 +136,7 @@ Feature: Manual creation of spans
138
136
Scenario: Manually report a UIViewController load span
139
137
Given I run "ManualUIViewLoadScenario"
140
138
And I wait to receive at least 1 span
141
-
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
139
+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
142
140
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
143
141
* every span field "name" equals "[ViewLoad/UIKit]/UIViewController"
144
142
* every span string attribute "bugsnag.view.name" equals "UIViewController"
@@ -246,22 +244,20 @@ Feature: Manual creation of spans
246
244
247
245
Scenario: Manually start and end parent and child spans
248
246
Given I run "ParentSpanScenario"
249
-
And I wait to receive at least 2 spans
247
+
And I wait to receive a span named "SpanParent"
248
+
And I wait to receive a span named "SpanChild"
250
249
Then the trace "Content-Type" header equals "application/json"
250
+
* a span named "SpanChild" is a child of span named "SpanParent"
251
251
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
252
252
* the trace payload field "resourceSpans.0.resource" string attribute "service.name" matches the regex "com.bugsnag.fixtures.cocoaperformance(xcframework)?"
253
253
* the trace payload field "resourceSpans.0.resource" string attribute "telemetry.sdk.name" equals "bugsnag.performance.cocoa"
254
254
* the trace payload field "resourceSpans.0.resource" string attribute "telemetry.sdk.version" matches the regex "[0-9]+\.[0-9]+\.[0-9]+"
255
-
* a span field "name" equals "SpanParent"
256
-
* a span field "name" equals "SpanChild"
257
255
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
258
256
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
259
257
* every span field "kind" equals 1
260
258
* every span field "startTimeUnixNano" matches the regex "^[0-9]+$"
261
259
* every span field "endTimeUnixNano" matches the regex "^[0-9]+$"
262
260
* every span bool attribute "bugsnag.span.first_class" is true
263
-
# Note: The child span ends up first in the list of spans.
264
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.parentSpanId" matches the regex "^[A-Fa-f0-9]{16}$"
265
261
266
262
Scenario: Manually start and end child span with a manually defined parent
267
263
Given I run "ManualParentSpanScenario"
@@ -331,14 +327,13 @@ Feature: Manual creation of spans
331
327
332
328
Scenario: Manually start and end a span with nil parent context
333
329
Given I run "ManualSpanWithContextParentNilScenario"
334
-
And I wait to receive at least 3 spans
330
+
And I wait to receive a span named "ManualSpanWithContextParentNilScenario"
331
+
And I wait to receive a span named "ManualSpanWithContextParentSet"
332
+
And I wait to receive a span named "ShouldNotBeParentSpan"
335
333
Then the trace "Content-Type" header equals "application/json"
334
+
* a span named "ManualSpanWithContextParentSet" is a child of span named "ManualSpanWithContextParentNilScenario"
335
+
* a span named "ManualSpanWithContextParentNilScenario" has no parent
336
+
* a span named "ShouldNotBeParentSpan" has no parent
336
337
* the trace "Bugsnag-Integrity" header matches the regex "^sha1 [A-Fa-f0-9]{40}$"
337
-
* the trace "Bugsnag-Span-Sampling" header equals "1:3"
338
+
* the trace "Bugsnag-Span-Sampling" header matches the regex "^1:\d{1,2}$"
338
339
* the trace "Bugsnag-Sent-At" header matches the regex "^\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\dZ$"
339
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.name" equals "ManualSpanWithContextParentNilScenario"
340
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.name" equals "ManualSpanWithContextParentSet"
341
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.2.name" equals "ShouldNotBeParentSpan"
342
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.parentSpanId" is null
343
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.1.parentSpanId" matches the regex "^[A-Fa-f0-9]{16}$"
344
-
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.2.parentSpanId" is null
0 commit comments