Skip to content

Commit 335cf2c

Browse files
authored
Release v1.6.0 (#116)
2 parents 0efb021 + 1cbfdb6 commit 335cf2c

33 files changed

+391
-78
lines changed

.buildkite/pipeline.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ steps:
6666
concurrency: 25
6767
concurrency_group: 'bitbar'
6868
concurrency_method: eager
69+
retry:
70+
automatic:
71+
- exit_status: 103 # Appium session failed
72+
limit: 2
6973

7074

7175
#
@@ -117,3 +121,7 @@ steps:
117121
concurrency: 25
118122
concurrency_group: 'bitbar'
119123
concurrency_method: eager
124+
retry:
125+
automatic:
126+
- exit_status: 103 # Appium session failed
127+
limit: 2

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
## 1.6.0 (2025-09-10)
5+
6+
### Changes
7+
8+
* Allow customisation of app start spans via new span control API [#113](https://github.com/bugsnag/bugsnag-flutter-performance/pull/113)
9+
410
## 1.5.0 (2025-07-17)
511

612
### Changes

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gem 'cocoapods'
44

55
# A reference to Maze Runner is only needed for running tests locally and if committed it must be
66
# portable for CI, e.g. a specific release. However, leaving it commented out would mean quicker CI.
7-
gem 'bugsnag-maze-runner', '~> 9.0'
7+
gem 'bugsnag-maze-runner', '~> 10.0'
88

99
# Use a specific branch
1010
#gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', branch: 'master'

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.0
1+
1.6.0

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
version: '3.6'
21
services:
32

43
maze-runner:
5-
image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v9-cli
4+
image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v10-cli
65
environment:
76
DEBUG:
87
BITBAR_USERNAME:

features/automatic_spans.feature

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Automatic instrumentation spans
55

66
Scenario: AutoInstrumentAppStartsScenario
77
Given I run "AutoInstrumentAppStartsScenario"
8-
And I wait for 4 spans
8+
And I wait to receive at least 4 spans
99
Then the trace "Content-Type" header equals "application/json"
1010
* the trace "Bugsnag-Span-Sampling" header equals "1:4"
1111
* 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$"
@@ -30,7 +30,7 @@ Feature: Automatic instrumentation spans
3030

3131
Scenario: AutoInstrumentNavigationBasicScenario
3232
Given I run "AutoInstrumentNavigationBasicScenario"
33-
And I wait for 1 span
33+
And I wait to receive at least 1 span
3434
Then the trace "Content-Type" header equals "application/json"
3535
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
3636
* 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$"
@@ -51,7 +51,7 @@ Feature: Automatic instrumentation spans
5151
And I wait for 5 seconds
5252
* no span named "[Navigation]basic_defer_navigation_scenario" exists
5353
And I invoke "step2"
54-
Then I wait for 1 span
54+
Then I wait to receive at least 1 span
5555
Then the trace "Content-Type" header equals "application/json"
5656
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
5757
* 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$"
@@ -77,7 +77,7 @@ Feature: Automatic instrumentation spans
7777
And I wait for 3 seconds
7878
* no span named "[Navigation]complex_defer_navigation_scenario" exists
7979
Then I invoke "step4"
80-
And I wait for 1 span
80+
And I wait to receive at least 1 span
8181
Then the trace "Content-Type" header equals "application/json"
8282
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
8383
* 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$"
@@ -97,7 +97,7 @@ Feature: Automatic instrumentation spans
9797
And I wait for 3 seconds
9898
* no span named "[Navigation]nested_defer_navigation_scenario_parent" exists
9999
Then I invoke "step2"
100-
And I wait for 2 spans
100+
And I wait to receive at least 2 spans
101101
* a span field "name" equals "[Navigation]nested_defer_navigation_scenario_parent"
102102
* a span string attribute "bugsnag.navigation.route" equals "nested_defer_navigation_scenario_parent"
103103
* a span string attribute "bugsnag.navigation.triggered_by" equals "push"
@@ -111,15 +111,15 @@ Feature: Automatic instrumentation spans
111111
* a span string attribute "bugsnag.navigation.previous_route" equals "/"
112112
* a span string attribute "bugsnag.navigation.navigator" equals "nested_scenario_child_navigator"
113113
Then I invoke "step3"
114-
And I wait for 3 spans
114+
And I wait to receive at least 3 spans
115115
* a span field "name" equals "[Navigation]nested_scenario_child_navigator/nested_scenario_child_route_2"
116116
* a span string attribute "bugsnag.navigation.route" equals "nested_scenario_child_route_2"
117117
* a span string attribute "bugsnag.navigation.triggered_by" equals "push"
118118
* a span string attribute "bugsnag.navigation.ended_by" equals "frame_render"
119119
* a span string attribute "bugsnag.navigation.previous_route" equals "nested_scenario_child_route_initial"
120120
* a span string attribute "bugsnag.navigation.navigator" equals "nested_scenario_child_navigator"
121121
Then I invoke "step4"
122-
And I wait for 4 span
122+
And I wait to receive at least 4 spans
123123
Then the trace "Content-Type" header equals "application/json"
124124
* 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$"
125125
* a span field "name" equals "[Navigation]nested_scenario_child_navigator/nested_scenario_child_route_3"
@@ -136,14 +136,14 @@ Feature: Automatic instrumentation spans
136136

137137
Scenario: AutoInstrumentNavigationPushAndPopScenario
138138
Given I run "AutoInstrumentNavigationPushAndPopScenario"
139-
And I wait for 1 span
139+
And I wait to receive at least 1 span
140140
* a span field "name" equals "[Navigation]push_and_pop_scenario"
141141
* a span string attribute "bugsnag.navigation.route" equals "push_and_pop_scenario"
142142
* a span string attribute "bugsnag.navigation.triggered_by" equals "push"
143143
* a span string attribute "bugsnag.navigation.ended_by" equals "frame_render"
144144
* a span string attribute "bugsnag.navigation.previous_route" equals "/"
145145
And I invoke "step2"
146-
Then I wait for 2 spans
146+
Then I wait to receive at least 2 spans
147147
Then the trace "Content-Type" header equals "application/json"
148148
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
149149
* 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$"
@@ -160,7 +160,7 @@ Feature: Automatic instrumentation spans
160160

161161
Scenario: AutoInstrumentViewLoadBasicScenario
162162
Given I run "AutoInstrumentViewLoadBasicScenario"
163-
And I wait for 3 spans
163+
And I wait to receive at least 3 spans
164164
And I wait for 3 seconds
165165
Then the trace "Content-Type" header equals "application/json"
166166
* the trace "Bugsnag-Span-Sampling" header equals "1:3"
@@ -183,7 +183,7 @@ Feature: Automatic instrumentation spans
183183

184184
Scenario: AutoInstrumentViewLoadBasicDeferScenario
185185
Given I run "AutoInstrumentViewLoadBasicDeferScenario"
186-
And I wait for 2 spans
186+
And I wait to receive at least 2 spans
187187
And I wait for 3 seconds
188188
Then the trace "Content-Type" header equals "application/json"
189189
* 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$"
@@ -195,7 +195,7 @@ Feature: Automatic instrumentation spans
195195
* no span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget" exists
196196
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading content" exists
197197
And I invoke "step2"
198-
And I wait for 4 spans
198+
And I wait to receive at least 4 spans
199199
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget"
200200
* a span string attribute "bugsnag.span.category" equals "view_load"
201201
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading content"
@@ -211,7 +211,7 @@ Feature: Automatic instrumentation spans
211211

212212
Scenario: AutoInstrumentViewLoadNestedScenario
213213
Given I run "AutoInstrumentViewLoadNestedScenario"
214-
And I wait for 4 spans
214+
And I wait to receive at least 4 spans
215215
And I wait for 3 seconds
216216
Then the trace "Content-Type" header equals "application/json"
217217
* 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$"
@@ -227,7 +227,7 @@ Feature: Automatic instrumentation spans
227227
* no span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget" exists
228228
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading content" exists
229229
And I invoke "step2"
230-
And I wait for 8 spans
230+
And I wait to receive at least 8 spans
231231
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget"
232232
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget"
233233
* a span string attribute "bugsnag.span.category" equals "view_load"
@@ -260,7 +260,7 @@ Feature: Automatic instrumentation spans
260260
* no span named "[Navigation]navigation_view_load_scenario" exists
261261
* no span named "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget" exists
262262
Then I invoke "step4"
263-
And I wait for 5 spans
263+
And I wait to receive at least 5 spans
264264
Then the trace "Content-Type" header equals "application/json"
265265
* the trace "Bugsnag-Span-Sampling" header equals "1:1"
266266
* 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$"

features/configuration.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feature: Configuration overrides
77
Given I set the sampling probability for the next traces to "0"
88
And I enter unmanaged traces mode
99
And I run "FixedSamplingProbabilityOneScenario"
10-
And I wait for 1 span
10+
And I wait to receive at least 1 span
1111
Then the trace "Content-Type" header equals "application/json"
1212
* the trace "Bugsnag-Integrity" header matches the regex "^sha1 [A-Fa-f0-9]{40}$"
1313
* the trace "Bugsnag-Span-Sampling" header is not present
@@ -20,7 +20,7 @@ Feature: Configuration overrides
2020
Then I discard the oldest trace
2121
Then I set the sampling probability for the next traces to "0"
2222
And I invoke "step2"
23-
And I wait for 1 span
23+
And I wait to receive at least 1 span
2424
* the trace "Bugsnag-Span-Sampling" header is not present
2525
* 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$"
2626
* every span field "name" equals "FixedSamplingProbabilitySpan2"

features/correlation.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: Error correlation
66
Scenario: CorrelationSimpleScenario
77
When I run "CorrelationSimpleScenario"
88
* I wait to receive an error
9-
* I wait for 1 span
9+
* I wait to receive at least 1 span
1010
* the exception "message" equals "CorrelationSimpleScenario"
1111

1212
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.spanId" matches the regex "^[A-Fa-f0-9]{16}$"
@@ -21,7 +21,7 @@ Feature: Error correlation
2121
Scenario: CorrelationNullScenario
2222
When I run "CorrelationNullScenario"
2323
* I wait to receive an error
24-
* I wait for 1 span
24+
* I wait to receive at least 1 span
2525
* the exception "message" equals "CorrelationNullScenario"
2626
* the error payload field "events.0.correlation" is null
2727

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import 'package:bugsnag_flutter_performance/bugsnag_flutter_performance.dart';
2+
3+
import '../main.dart';
4+
import 'scenario.dart';
5+
6+
class ClearCustomAppStartNameScenario extends Scenario {
7+
@override
8+
Future<void> run() async {
9+
bugsnag_performance.setExtraConfig('instrumentAppStart', true);
10+
bugsnag_performance.setExtraConfig('probabilityValueExpireTime', 1000);
11+
bugsnag_performance.start(
12+
apiKey: '12312312312312312312312312312312',
13+
endpoint: Uri.parse('${FixtureConfig.MAZE_HOST}/traces'));
14+
final control = bugsnag_performance.getSpanControl<AppStartSpanControl>();
15+
control?.setType('FirstOpen');
16+
control?.clearType();
17+
bugsnag_performance.measureRunApp(() async => const Duration(seconds: 1));
18+
setMaxBatchSize(4);
19+
}
20+
}

features/fixture_resources/lib/scenarios/scenarios.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ import 'check_network_callback_type_scenario.dart';
4949
import 'custom_span_time_scenario.dart';
5050
import 'span_with_no_parent_scenario.dart';
5151
import 'scenario.dart';
52+
import 'set_custom_app_start_name_scenario.dart';
53+
import 'clear_custom_app_start_name_scenario.dart';
5254

5355
class ScenarioInfo<T extends Scenario> {
5456
const ScenarioInfo(this.name, this.init);
@@ -132,5 +134,9 @@ final List<ScenarioInfo<Scenario>> scenarios = [
132134
ScenarioInfo(
133135
'CustomSpanAttributesScenario', () => CustomSpanAttributesScenario()),
134136
ScenarioInfo('CustomSpanAttributesWithLimitsScenario',
135-
() => CustomSpanAttributesWithLimitsScenario())
137+
() => CustomSpanAttributesWithLimitsScenario()),
138+
ScenarioInfo('SetCustomAppStartNameScenario',
139+
() => SetCustomAppStartNameScenario()),
140+
ScenarioInfo('ClearCustomAppStartNameScenario',
141+
() => ClearCustomAppStartNameScenario()),
136142
];

0 commit comments

Comments
 (0)