Skip to content

Commit cc31e4b

Browse files
committed
Merge branch 'main' into feat/isar
# Conflicts: # dart/lib/src/sentry_trace_origins.dart # flutter/example/lib/main.dart # flutter/example/pubspec.yaml # flutter/example/pubspec_overrides.yaml
2 parents 8cefb7e + 67a0238 commit cc31e4b

File tree

101 files changed

+7047
-141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+7047
-141
lines changed

.craft.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ targets:
1111
dio:
1212
file:
1313
sqflite:
14+
hive:
15+
drift:
1416
- name: github
1517
- name: registry
1618
sdks:
@@ -20,3 +22,5 @@ targets:
2022
pub:sentry_dio:
2123
pub:sentry_file:
2224
pub:sentry_sqflite:
25+
pub:sentry_drift:
26+
pub:sentry_hive:

.github/workflows/dart.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "dio/**"
1212
- "file/**"
1313
- "sqflite/**"
14+
- "hive/**"
15+
- "drift/**"
1416

1517
jobs:
1618
cancel-previous-workflow:

.github/workflows/diagrams.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
working-directory: ./logging
4444
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
4545

46+
- name: hive
47+
working-directory: ./hive
48+
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
49+
4650
# Source: https://stackoverflow.com/a/58035262
4751
- name: Extract branch name
4852
shell: bash

.github/workflows/dio.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "flutter/**"
1212
- "file/**"
1313
- "sqflite/**"
14+
- "hive/**"
15+
- "drift/**"
1416

1517
jobs:
1618
cancel-previous-workflow:

.github/workflows/drift.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: sentry-drift
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- release/**
7+
pull_request:
8+
paths-ignore:
9+
- "**/*.md"
10+
- "logging/**"
11+
- "flutter/**"
12+
- "dio/**"
13+
- "file/**"
14+
- "sqflite/**"
15+
16+
jobs:
17+
cancel-previous-workflow:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Cancel Previous Runs
21+
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # pin@0.12.0
22+
with:
23+
access_token: ${{ github.token }}
24+
25+
build:
26+
name: ${{ matrix.target }} | ${{ matrix.os }} | ${{ matrix.sdk }}
27+
runs-on: ${{ matrix.os }}
28+
timeout-minutes: 30
29+
defaults:
30+
run:
31+
shell: bash
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
os: [ubuntu-latest, macos-latest, windows-latest]
36+
target: ["ios", "android", "macos", "linux", "windows"]
37+
sdk: ["stable", "beta"]
38+
exclude:
39+
- os: ubuntu-latest
40+
target: ios
41+
- os: ubuntu-latest
42+
target: macos
43+
- os: ubuntu-latest
44+
target: windows
45+
- os: windows-latest
46+
target: ios
47+
- os: windows-latest
48+
target: android
49+
- os: windows-latest
50+
target: macos
51+
- os: windows-latest
52+
target: linux
53+
# macos-latest is taking hours due to limited resources
54+
- os: macos-latest
55+
target: android
56+
- os: macos-latest
57+
target: linux
58+
- os: macos-latest
59+
target: windows
60+
# Bad CPU type in executable
61+
- os: macos-latest
62+
sdk: beta
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
67+
- uses: actions/setup-java@v3
68+
if: ${{ matrix.target == 'android' }}
69+
with:
70+
java-version: "11"
71+
distribution: "adopt"
72+
73+
# Install required dependencies for Flutter on Linux on Ubuntu
74+
- name: "Setup Linux"
75+
run: |
76+
sudo apt update
77+
sudo apt install -y cmake dbus libblkid-dev libgtk-3-dev liblzma-dev ninja-build pkg-config xvfb
78+
sudo apt install -y network-manager upower
79+
if: matrix.os == 'ubuntu-latest' && matrix.target == 'linux'
80+
81+
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
82+
with:
83+
channel: ${{ matrix.sdk }}
84+
85+
- run: flutter upgrade
86+
87+
- name: Pub Get
88+
run: |
89+
cd drift
90+
flutter pub get
91+
92+
- name: Test VM with coverage
93+
run: |
94+
cd drift
95+
flutter test --coverage --test-randomize-ordering-seed=random
96+
97+
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@v3
98+
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
99+
with:
100+
name: sentry_drift
101+
file: ./drift/coverage/lcov.info
102+
functionalities: "search" # remove after https://github.com/codecov/codecov-action/issues/600
103+
104+
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
105+
if: runner.os == 'Linux' && matrix.sdk == 'stable' && matrix.target == 'linux'
106+
with:
107+
path: "./drift/coverage/lcov.info"
108+
min_coverage: 80
109+
110+
analyze:
111+
uses: ./.github/workflows/analyze.yml
112+
with:
113+
package: drift
114+
sdk: flutter

.github/workflows/e2e_dart.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
- "flutter/**"
1313
- "file/**"
1414
- "sqflite/**"
15+
- "hive/**"
16+
- "drift/**"
1517

1618
env:
1719
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

.github/workflows/file.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "flutter/**"
1212
- "dio/**"
1313
- "sqflite/**"
14+
- "hive/**"
15+
- "drift/**"
1416

1517
jobs:
1618
cancel-previous-workflow:

.github/workflows/flutter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "dio/**"
1212
- "file/**"
1313
- "sqflite/**"
14+
- "hive/**"
15+
- "drift/**"
1416

1517
jobs:
1618
cancel-previous-workflow:

.github/workflows/hive.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: sentry-hive
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- release/**
7+
pull_request:
8+
paths-ignore:
9+
- "**/*.md"
10+
- "logging/**"
11+
- "flutter/**"
12+
- "dio/**"
13+
- "file/**"
14+
- "sqflite/**"
15+
16+
jobs:
17+
cancel-previous-workflow:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Cancel Previous Runs
21+
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # pin@0.11.0
22+
with:
23+
access_token: ${{ github.token }}
24+
25+
build:
26+
name: Build ${{matrix.sdk}} on ${{matrix.os}}
27+
runs-on: ${{ matrix.os }}
28+
timeout-minutes: 30
29+
defaults:
30+
run:
31+
shell: bash
32+
working-directory: ./hive
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
os: [ubuntu-latest, windows-latest, macos-latest]
37+
sdk: [stable, beta]
38+
exclude:
39+
- os: windows-latest
40+
sdk: beta
41+
- os: macos-latest
42+
sdk: beta
43+
steps:
44+
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
45+
with:
46+
sdk: ${{ matrix.sdk }}
47+
- uses: actions/checkout@v3
48+
49+
- name: Test VM
50+
run: |
51+
dart pub get
52+
dart test -p vm --coverage=coverage --test-randomize-ordering-seed=random --chain-stack-traces
53+
dart pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
54+
55+
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3
56+
if: runner.os == 'Linux' && matrix.sdk == 'stable'
57+
with:
58+
name: sentry_hive
59+
files: ./hive/coverage/lcov.info
60+
61+
- uses: VeryGoodOpenSource/very_good_coverage@e5c91bc7ce9843e87c800b3bcafdfb86fbe28491 # pin@v2.1.0
62+
if: runner.os == 'Linux' && matrix.sdk == 'stable'
63+
with:
64+
path: "./hive/coverage/lcov.info"
65+
min_coverage: 55
66+
67+
analyze:
68+
uses: ./.github/workflows/analyze.yml
69+
with:
70+
package: hive
71+
panaThreshold: 90

.github/workflows/logging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "flutter/**"
1212
- "file/**"
1313
- "sqflite/**"
14+
- "hive/**"
15+
- "drift/**"
1416

1517
jobs:
1618
cancel-previous-workflow:

.github/workflows/min_version_test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- "**/*.md"
1010
- "file/**"
1111
- "sqflite/**"
12+
- "hive/**"
13+
- "drift/**"
1214

1315
jobs:
1416
cancel-previous-workflow:

.github/workflows/sqflite.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- "flutter/**"
1212
- "dio/**"
1313
- "file/**"
14+
- "hive/**"
15+
- "drift/**"
1416

1517
jobs:
1618
cancel-previous-workflow:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ dio/coverage/*
2222
file/coverage/*
2323
flutter/coverage/*
2424
sqflite/coverage/*
25+
drift/coverage/*
26+
hive/coverage/*
2527

2628
pubspec.lock
2729
Podfile.lock

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
# Changelog
22

3-
## Unreleased
3+
## 7.13.1
4+
5+
### Fixes
6+
7+
- Fixes release of drift & hive and adds missing integration & sdk version information in the hub options ([#1729](https://github.com/getsentry/sentry-dart/pull/1729))
8+
9+
## 7.13.0
410

511
### Fixes
612

13+
- Fixes setting the correct locale to contexts with navigatorKey ([#1724](https://github.com/getsentry/sentry-dart/pull/1724))
14+
- If you have a selected locale in e.g MaterialApp, this fix will retrieve the correct locale for the event context.
15+
- Flutter renderer information was removed on dart:io platforms since it didn't add the correct value ([#1723](https://github.com/getsentry/sentry-dart/pull/1723))
716
- Unsupported types with Expando ([#1690](https://github.com/getsentry/sentry-dart/pull/1690))
817

918
### Features
1019

20+
- Add APM integration for Drift ([#1709](https://github.com/getsentry/sentry-dart/pull/1709))
1121
- StackTraces in `PlatformException.message` will get nicely formatted too when present ([#1716](https://github.com/getsentry/sentry-dart/pull/1716))
1222
- Breadcrumbs for database operations ([#1656](https://github.com/getsentry/sentry-dart/pull/1656))
23+
- APM for hive ([#1672](https://github.com/getsentry/sentry-dart/pull/1672))
1324
- Add `attachScreenshotOnlyWhenResumed` to options ([#1700](https://github.com/getsentry/sentry-dart/pull/1700))
1425

1526
### Dependencies

dart/lib/src/sentry_trace_origins.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@ class SentryTraceOrigins {
2020
'auto.db.sqflite.database_factory';
2121
static const autoDbIsar = 'auto.db.isar';
2222
static const autoDbIsarCollection = 'auto.db.isar.collection';
23+
static const autoDbHive = 'auto.db.hive';
24+
static const autoDbHiveBoxBase = 'auto.db.hive.box_base';
25+
static const autoDbHiveLazyBox = 'auto.db.hive.lazy_box';
26+
static const autoDbHiveBoxCollection = 'auto.db.hive.box_collection';
27+
static const autoDbDriftQueryExecutor = 'auto.db.drift.query.executor';
28+
static const autoDbDriftTransactionExecutor =
29+
'auto.db.drift.transaction.executor';
2330
}

dart/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
library version;
1010

1111
/// The SDK version reported to Sentry.io in the submitted events.
12-
const String sdkVersion = '7.12.0';
12+
const String sdkVersion = '7.13.1';
1313

1414
String sdkName(bool isWeb) => isWeb ? _browserSdkName : _ioSdkName;
1515

dart/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sentry
2-
version: 7.12.0
2+
version: 7.13.1
33
description: >
44
A crash reporting library for Dart that sends crash reports to Sentry.io.
55
This library supports Dart VM and Web. For Flutter consider sentry_flutter instead.

dio/lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// The SDK version reported to Sentry.io in the submitted events.
2-
const String sdkVersion = '7.12.0';
2+
const String sdkVersion = '7.13.1';
33

44
/// The package name reported to Sentry.io in the submitted events.
55
const String packageName = 'pub:sentry_dio';

dio/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sentry_dio
22
description: An integration which adds support for performance tracing for the Dio package.
3-
version: 7.12.0
3+
version: 7.13.1
44
homepage: https://docs.sentry.io/platforms/dart/
55
repository: https://github.com/getsentry/sentry-dart
66
issue_tracker: https://github.com/getsentry/sentry-dart/issues
@@ -11,7 +11,7 @@ environment:
1111

1212
dependencies:
1313
dio: ^5.0.0
14-
sentry: 7.12.0
14+
sentry: 7.13.1
1515

1616
dev_dependencies:
1717
meta: ^1.3.0

drift/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Omit committing pubspec.lock for library packages; see
2+
# https://dart.dev/guides/libraries/private-files#pubspeclock.
3+
pubspec.lock
4+
5+
# Flutter/Dart/Pub related
6+
**/doc/api/
7+
**/ios/Flutter/.last_build_id
8+
.dart_tool/
9+
.flutter-plugins
10+
.flutter-plugins-dependencies
11+
.packages
12+
.pub-cache/
13+
.pub/
14+
/build/

drift/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

0 commit comments

Comments
 (0)