Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.4.0 #95

Merged
merged 12 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
agents:
queue: macos-12-arm
queue: macos-14

steps:

- label: ":test_tube: 3.10.0"
- label: ":test_tube: 3.19.0"
timeout_in_minutes: 10
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
FLUTTER_VERSION: "3.19.0"
commands:
- make test

- label: ":lint-roller: 3.10.0"
- label: ":lint-roller: 3.19.0"
timeout_in_minutes: 10
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
FLUTTER_VERSION: "3.19.0"
commands:
- make lint

Expand All @@ -23,8 +23,10 @@ steps:
- label: Build iOS Test Fixture
key: "ios-fixture-3-10-0"
timeout_in_minutes: 20
agents:
queue: macos-14
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
FLUTTER_VERSION: "3.19.0"
commands:
- bundle install
- pod repo update trunk
Expand All @@ -39,7 +41,7 @@ steps:
depends_on: "ios-fixture-3-10-0"
timeout_in_minutes: 20
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
FLUTTER_VERSION: "3.19.0"
agents:
queue: opensource
plugins:
Expand Down Expand Up @@ -75,8 +77,8 @@ steps:
key: "android-fixture-3-10-0"
timeout_in_minutes: 20
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
JAVA_VERSION: "11"
FLUTTER_VERSION: "3.19.0"
JAVA_VERSION: "17"
commands:
- bundle install
- features/scripts/generate_fixture.sh
Expand All @@ -86,11 +88,11 @@ steps:
upload:
- "features/fixtures/mazerunner/build/app/outputs/flutter-apk/app-release.apk"

- label: ':bitbar: Android 12 end-to-end tests 3.10.0'
- label: ':bitbar: Android 12 end-to-end tests 3.19.0'
depends_on: "android-fixture-3-10-0"
timeout_in_minutes: 20
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
FLUTTER_VERSION: "3.19.0"
agents:
queue: opensource
plugins:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "packages/bugsnag-flutter-common"]
path = packages/bugsnag-flutter-common
url = git@github.com:bugsnag/bugsnag-flutter-common.git
url = https://github.com/bugsnag/bugsnag-flutter-common
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Changelog
=========

## 1.4.0 (2025-01-17)

### Changes

* Bumped min Dart SDK version to 3.3.0 and min Flutter SDK version to 3.19.0 [94](https://github.com/bugsnag/bugsnag-flutter-performance/pull/94)

### Enhancements

* Upgraded the `connectivity_plus` dependency version to 6.0.5 [94](https://github.com/bugsnag/bugsnag-flutter-performance/pull/94)

* Replaced the dependency on `package_info` with the new `package_info_plus` package [94](https://github.com/bugsnag/bugsnag-flutter-performance/pull/94)

### Bug fixes

* Changed `loading` view load phase name to `loading content` [67](https://github.com/bugsnag/bugsnag-flutter-performance/pull/67)

## 1.3.0 (2024-09-30)

### Enhancements
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h1>Performance monitoring for Flutter</h1>
</div>

[![Documentation](https://img.shields.io/badge/documentation-latest-blue.svg)](https://docs.bugsnag.com/performance/flutter/)
[![Documentation](https://img.shields.io/badge/documentation-latest-blue.svg)](https://docs.bugsnag.com/performance/integration-guides/flutter/)
[![Build status](https://badge.buildkite.com/700ab6c9d7b51c72fa52459ad023b503692bde8bf5337b93a0.svg?branch=main)](https://buildkite.com/bugsnag/bugsnag-flutter-performance)

Monitor the start-up, navigation and network requests of Flutter apps running on iOS and Android and see the results in your [BugSnag](https://www.bugsnag.com) dashboard.
Expand All @@ -21,14 +21,14 @@ Monitor the start-up, navigation and network requests of Flutter apps running on

## Getting started

For integration instructions, see our online docs: [docs.bugsnag.com/performance/flutter](https://docs.bugsnag.com/performance/flutter/)
For integration instructions, see our online docs: [docs.bugsnag.com/performance/integration-guides/flutter/](https://docs.bugsnag.com/performance/integration-guides/flutter/)

## Support

* [Read the integration guide](https://docs.bugsnag.com/performance/flutter/)
* [Read the integration guide](https://docs.bugsnag.com/performance/integration-guides/flutter/)
* [Search open and closed issues](https://github.com/bugsnag/bugsnag-flutter-performance/issues?utf8=✓&q=is%3Aissue) for similar problems
* [Report a bug or request a feature](https://github.com/bugsnag/bugsnag-flutter-performance/issues/new)

## License

The BugSnag Flutter Performance SDK is free software released under the MIT License. See the [LICENSE](./LICENSE) for details.
The BugSnag Flutter Performance SDK is free software released under the MIT License. See the [LICENSE](./LICENSE) for details.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/bugsnag_performance_example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
Expand Down Expand Up @@ -452,7 +452,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -580,7 +580,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -629,7 +629,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
2 changes: 1 addition & 1 deletion example/bugsnag_performance_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies:
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
path: ../../packages/bugsnag_flutter_performance

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
Expand Down
28 changes: 15 additions & 13 deletions features/automatic_spans.feature
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Feature: Automatic instrumentation spans
* a span string attribute "bugsnag.phase" equals "building"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicScenarioWidget/appearing"
* a span string attribute "bugsnag.phase" equals "appearing"
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicScenarioWidget/loading" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicScenarioWidget/loading content" exists
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
* every span field "startTimeUnixNano" matches the regex "^[0-9]+$"
Expand All @@ -190,20 +190,21 @@ Feature: Automatic instrumentation spans
* a span string attribute "bugsnag.phase" equals "appearing"
* a span string attribute "bugsnag.span.category" equals "view_load_phase"
* no span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading content" exists
And I invoke "step2"
And I wait for 4 spans
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget"
* a span string attribute "bugsnag.span.category" equals "view_load"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading content"
* a span string attribute "bugsnag.phase" equals "loading content"
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
* every span field "startTimeUnixNano" matches the regex "^[0-9]+$"
* every span field "endTimeUnixNano" matches the regex "^[0-9]+$"
* every span bool attribute "bugsnag.span.first_class" does not exist
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/building"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/appearing"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadBasicDeferScenarioWidget/loading content"

Scenario: AutoInstrumentViewLoadNestedScenario
Given I run "AutoInstrumentViewLoadNestedScenario"
Expand All @@ -219,27 +220,28 @@ Feature: Automatic instrumentation spans
* a span string attribute "bugsnag.phase" equals "appearing"
* a span string attribute "bugsnag.span.category" equals "view_load_phase"
* no span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/loading" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/loading content" exists
* no span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading" exists
* no span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading content" exists
And I invoke "step2"
And I wait for 8 spans
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget"
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget"
* a span string attribute "bugsnag.span.category" equals "view_load"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/loading"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/loading content"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading content"
* a span string attribute "bugsnag.phase" equals "loading content"
* every span field "spanId" matches the regex "^[A-Fa-f0-9]{16}$"
* every span field "traceId" matches the regex "^[A-Fa-f0-9]{32}$"
* every span field "startTimeUnixNano" matches the regex "^[0-9]+$"
* every span field "endTimeUnixNano" matches the regex "^[0-9]+$"
* every span bool attribute "bugsnag.span.first_class" does not exist
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/building"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/appearing"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/loading"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioWidget/loading content"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/building"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/appearing"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentViewLoadNestedScenarioChildWidget/loading content"

Scenario: AutoInstrumentNavigationWithViewLoadScenario
Given I run "AutoInstrumentNavigationWithViewLoadScenario"
Expand Down Expand Up @@ -268,8 +270,8 @@ Feature: Automatic instrumentation spans
* a span string attribute "bugsnag.phase" equals "building"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/appearing"
* a span string attribute "bugsnag.phase" equals "appearing"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/loading"
* a span string attribute "bugsnag.phase" equals "loading"
* a span field "name" equals "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/loading content"
* a span string attribute "bugsnag.phase" equals "loading content"
* a span string attribute "bugsnag.span.category" equals "view_load_phase"
* a span field "name" equals "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget"
* a span string attribute "bugsnag.span.category" equals "view_load"
Expand All @@ -280,5 +282,5 @@ Feature: Automatic instrumentation spans
* every span bool attribute "bugsnag.span.first_class" does not exist
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/building"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/appearing"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/loading"
* the span named "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget" is the parent of the span named "[ViewLoadPhase]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget/loading content"
* the span named "[Navigation]navigation_view_load_scenario" is the parent of the span named "[ViewLoad]FlutterWidget/AutoInstrumentNavigationWithViewLoadWidget"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:convert';
import 'dart:io';
import 'package:package_info/package_info.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:uuid/uuid.dart';
import 'package:path_provider/path_provider.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:package_info/package_info.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:bugsnag_flutter_performance/src/device_id_manager.dart';
import 'package:connectivity_plus/connectivity_plus.dart';

Expand Down Expand Up @@ -28,12 +28,12 @@ class ResourceAttributesProviderImpl implements ResourceAttributesProvider {
}

Future<void> _addNetworkStatus() async {
var status = "unavailable";
var status = 'unavailable';
final connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
status = "cell";
} else if (connectivityResult == ConnectivityResult.wifi) {
status = "wifi";
if (connectivityResult.contains(ConnectivityResult.wifi)) {
status = 'wifi';
} else if (connectivityResult.contains(ConnectivityResult.mobile)) {
status = 'cell';
}

Map<String, Object> networkStatusAttribute = {
Expand Down Expand Up @@ -196,5 +196,5 @@ class ResourceAttributesProviderImpl implements ResourceAttributesProvider {
return "Unknown";
}

static String get _getSDKVersion => '1.3.0';
static String get _getSDKVersion => '1.4.0';
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ViewLoadInstrumentationImpl implements ViewLoadInstrumentation {
if (node.isLoading()) {
state.loadingSpan = client.startViewLoadPhaseSpan(
viewName: state.name,
phase: 'loading',
phase: 'loading content',
parentContext: viewLoadSpan,
);
node.addDidFinishLoadingCallback(() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class _Random {
int nextInt(int max) {
try {
if (_secureRandom != null) {
return _secureRandom!.nextInt(max);
return _secureRandom.nextInt(max);
}
} catch (_) {
// When the system runs out of entropy, we fall back on a less secure random number source
Expand Down
10 changes: 5 additions & 5 deletions packages/bugsnag_flutter_performance/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: bugsnag_flutter_performance
description: BugSnag performance monitoring tool for Flutter apps
version: 1.3.0
version: 1.4.0
homepage: https://www.bugsnag.com/
documentation: https://docs.bugsnag.com/performance/flutter/
repository: https://github.com/bugsnag/bugsnag-flutter-performance
issue_tracker: https://github.com/bugsnag/bugsnag-flutter-performance/issues

environment:
sdk: '>=3.0.0 <4.0.0'
flutter: ">=3.10.0"
sdk: '>=3.3.0 <4.0.0'
flutter: ">=3.19.0"

dependencies:
crypto: ^3.0.3
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.2
device_info_plus: ^9.1.0
package_info: ^2.0.2
package_info_plus: ^8.0.0
path_provider: ^2.0.2
uuid: ^4.0.0
connectivity_plus: ^5.0.2
connectivity_plus: ^6.0.5
bugsnag_bridge: ^2.0.0

dev_dependencies:
Expand Down
Loading