Skip to content

Merge v8 into main #1997

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

Merged
merged 29 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1bb772c
Mark exceptions not handled by user as `handled: false` (#1535)
denrase Jul 27, 2023
3d1d35b
Refrain from overwriting the span status for unfinished spans (#1577)
denrase Aug 22, 2023
380c28a
Merge branch 'main' into release/8.0.0
denrase Aug 29, 2023
852a85e
update changelog
denrase Aug 29, 2023
c59de47
Do not leak extensions of external classes (#1576)
denrase Sep 4, 2023
052a368
Make `hint` non-nullable in `BeforeSendCallback`, `BeforeBreadcrumbCa…
denrase Sep 4, 2023
a37a793
Load Device Contexts from Sentry Java (#1616)
denrase Sep 11, 2023
9b28718
Set ip_address to {{auto}} by default, even if sendDefaultPII is disa…
denrase Oct 9, 2023
d99a1e4
chore: merge main into v8 branch (#1841)
buenaflor Jan 31, 2024
fab52eb
chore(v8): update to min ios version 12 (#1821)
buenaflor Jan 31, 2024
0fb55cf
v8 prep: merge main into 8.0.0 branch (#1871)
buenaflor Feb 7, 2024
5481ba1
Merge branch 'main' into release/8.0.0
buenaflor Feb 8, 2024
90c63b9
release: 8.0.0-beta.2
getsentry-bot Feb 8, 2024
89c8e41
Update CHANGELOG
buenaflor Feb 8, 2024
8166d0c
Merge branch 'release/8.0.0-beta.2' into release/8.0.0
Feb 9, 2024
6075021
Testflight (#1938)
denrase Apr 10, 2024
94ff648
Merge branch 'main' into release/8.0.0
buenaflor Apr 18, 2024
5539fed
Merge branch 'main' into release/8.0.0
buenaflor Apr 18, 2024
07d34a8
Fix test compilation
buenaflor Apr 18, 2024
4a762db
Update CHANGELOG.md
buenaflor Apr 18, 2024
e74ea75
Update CHANGELOG.md
buenaflor Apr 18, 2024
06368d6
Update CHANGELOG.md
buenaflor Apr 18, 2024
086d66e
Fix analyze issues
buenaflor Apr 18, 2024
621807f
Apply formatter
buenaflor Apr 18, 2024
3af8df8
Update versions to 8.0.0 (#1996)
buenaflor Apr 18, 2024
645aefa
Fix compilation
buenaflor Apr 18, 2024
9acd049
Exception aggregate mechanism (#1866)
ueman Apr 18, 2024
5d2ff07
Update CHANGELOG.md
buenaflor Apr 18, 2024
5264e78
Update CHANGELOG
buenaflor Apr 19, 2024
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
3 changes: 1 addition & 2 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@ targets:
pub:sentry_sqflite:
pub:sentry_drift:
pub:sentry_hive:
# Initial release on pub.dev needed first before uncommenting
# pub:sentry_isar:
pub:sentry_isar:
119 changes: 119 additions & 0 deletions .github/workflows/flutter_integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: flutter integration tests
on:
# Currently broken, enable after fixing
workflow_dispatch
# push:
# branches:
# - main
# - release/**
# pull_request:
# paths-ignore:
# - 'file/**'

jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # [email protected]
with:
access_token: ${{ github.token }}

test-android:
runs-on: macos-latest
timeout-minutes: 30
defaults:
run:
working-directory: ./flutter/example
strategy:
fail-fast: false
matrix:
sdk: [ "stable", "beta" ]
steps:
- name: checkout
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "11"

- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
with:
channel: ${{ matrix.sdk }}

- name: flutter upgrade
run: flutter upgrade

- name: flutter pub get
run: flutter pub get

- name: Gradle cache
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # [email protected]

- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-21

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected]
with:
working-directory: ./flutter/example
api-level: 21
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
arch: x86_64
profile: Nexus 6
script: echo 'Generated AVD snapshot for caching.'

- name: launch android emulator & run android integration test
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected]
with:
working-directory: ./flutter/example
api-level: 21
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
profile: Nexus 6
script: flutter test integration_test/integration_test.dart --verbose

test-ios:
runs-on: macos-13
timeout-minutes: 30
defaults:
run:
working-directory: ./flutter/example
strategy:
fail-fast: false
matrix:
# 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
sdk: [ "stable" ]
steps:
- name: checkout
uses: actions/checkout@v3

- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
with:
channel: ${{ matrix.sdk }}

- name: flutter upgrade
run: flutter upgrade

- name: flutter pub get
run: flutter pub get

- name: launch ios simulator
run: |
simulator_id=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-2)
xcrun simctl boot ${simulator_id}

- name: run ios integration test
run: flutter test integration_test/integration_test.dart --verbose
5 changes: 2 additions & 3 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: flutter pub get

- name: Gradle cache
uses: gradle/gradle-build-action@8baac4c8ef753599f92eeb509c246d09d6250fa6
uses: gradle/gradle-build-action@8baac4c8ef753599f92eeb509c246d09d6250fa6 # [email protected]

- name: AVD cache
uses: actions/cache@v4
Expand Down Expand Up @@ -120,8 +120,7 @@ jobs:
fail-fast: false
matrix:
sdk: ["stable", "beta"]
# TODO: remove ios for now, will be fixed in v8
target: ["macos"]
target: ["ios", "macos"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/testflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Upload to Testflight
on:
push:
branches:
- main
- release/**
pull_request:
paths:
- '.github/workflows/testflight.yml'

jobs:
upload_to_testflight:
name: Build and Upload to Testflight
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected]
- run: xcodes select 15.0.1
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # [email protected]
with:
ruby-version: '2.7.5'
bundler-cache: true

- name: flutter
working-directory: ./flutter/example
run: |
flutter upgrade
flutter pub get
flutter build ios --no-codesign

- name: Install Fastlane
working-directory: ./flutter/example/ios
run: bundle install

- name: Bump, Build & Upload App to TestFlight
working-directory: ./flutter/example/ios
env:
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }}
FASTLANE_BUNDLE_VERSION: ${{ github.run_number }}
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_LOG_LEVEL: DEBUG
run: |
bundle exec fastlane bump_build_number
bundle exec fastlane build_release
bundle exec fastlane upload_testflight

- name: Upload Symbols to Sentry
working-directory: ./flutter/example
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: flutter packages pub run sentry_dart_plugin
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Changelog

## Unreleased

This release contains breaking changes, please read the changelog carefully.

*Changes from the latest v7 release are included in this major release*

### Breaking Changes

- Bump iOS minimum deployment target from **11** to **12** ([#1821](https://github.com/getsentry/sentry-dart/pull/1821))
- Mark exceptions not handled by the user as `handled: false` ([#1535](https://github.com/getsentry/sentry-dart/pull/1535))
- This will affect your release health data, and is therefore considered a breaking change.
- Refrain from overwriting the span status for unfinished spans ([#1577](https://github.com/getsentry/sentry-dart/pull/1577))
- Older self-hosted sentry instances will drop transactions containing unfinished spans.
- This change was introduced in [relay/#1690](https://github.com/getsentry/relay/pull/1690) and released with [22.12.0](https://github.com/getsentry/relay/releases/tag/22.12.0)
- Do not leak extensions of external classes ([#1576](https://github.com/getsentry/sentry-dart/pull/1576))
- Make `hint` non-nullable in `BeforeSendCallback`, `BeforeBreadcrumbCall` and `EventProcessor` ([#1574](https://github.com/getsentry/sentry-dart/pull/1574))
- This will affect your callbacks, making this a breaking change.
- Load Device Contexts from Sentry Java ([#1616](https://github.com/getsentry/sentry-dart/pull/1616))
- Now the device context from Android is available in `BeforeSendCallback`
- Set ip_address to {{auto}} by default, even if sendDefaultPII is disabled ([#1665](https://github.com/getsentry/sentry-dart/pull/1665))
- Instead use the "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io

### Features

- Add support for exception aggregates ([#1866](https://github.com/getsentry/sentry-dart/pull/1866))

## 7.20.0

### Build
Expand Down Expand Up @@ -117,6 +143,40 @@
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8200)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.19.0...8.20.0)

## 8.0.0-beta.2

### Breaking Changes

- Bump iOS minimum deployment target from **11** to **12** ([#1821](https://github.com/getsentry/sentry-dart/pull/1821))
- Mark exceptions not handled by the user as `handled: false` ([#1535](https://github.com/getsentry/sentry-dart/pull/1535))
- This will affect your release health data, and is therefore considered a breaking change.
- Refrain from overwriting the span status for unfinished spans ([#1577](https://github.com/getsentry/sentry-dart/pull/1577))
- Older self-hosted sentry instances will drop transactions containing unfinished spans.
- This change was introduced in [relay/#1690](https://github.com/getsentry/relay/pull/1690) and released with [22.12.0](https://github.com/getsentry/relay/releases/tag/22.12.0)
- Do not leak extensions of external classes ([#1576](https://github.com/getsentry/sentry-dart/pull/1576))
- Make `hint` non-nullable in `BeforeSendCallback`, `BeforeBreadcrumbCall` and `EventProcessor` ([#1574](https://github.com/getsentry/sentry-dart/pull/1574))
- This will affect your callbacks, making this a breaking change.
- Load Device Contexts from Sentry Java ([#1616](https://github.com/getsentry/sentry-dart/pull/1616))
- Now the device context from Android is available in `BeforeSendCallback`
- Set ip_address to {{auto}} by default, even if sendDefaultPII is disabled ([#1665](https://github.com/getsentry/sentry-dart/pull/1665))
- Instead use the "Prevent Storing of IP Addresses" option in the "Security & Privacy" project settings on sentry.io

### Fixes

- Remove Flutter dependency from Drift integration ([#1867](https://github.com/getsentry/sentry-dart/pull/1867))
- Remove dead code, cold start bool is now always present ([#1861](https://github.com/getsentry/sentry-dart/pull/1861))
- Fix iOS "Arithmetic Overflow" ([#1874](https://github.com/getsentry/sentry-dart/pull/1874))

### Dependencies

- Bump Cocoa SDK from v8.19.0 to v8.20.0 ([#1856](https://github.com/getsentry/sentry-dart/pull/1856))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8200)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.19.0...8.20.0)

## 8.0.0-beta.1

This release is replaced by `8.0.0-beta.2`

## 7.16.0

### Features
Expand Down
11 changes: 7 additions & 4 deletions dart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,11 @@ Read more about [Automatic Instrumentation](https://docs.sentry.io/platforms/dar

#### Resources

* [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dart/)
* [![Forum](https://img.shields.io/badge/forum-sentry-green.svg)](https://forum.sentry.io/c/sdks)
* [![Discord](https://img.shields.io/discord/621778831602221064)](https://discord.gg/Ww9hbqr)
#### Resources

* [![Flutter docs](https://img.shields.io/badge/documentation-sentry.io-green.svg?label=flutter%20docs)](https://docs.sentry.io/platforms/flutter/)
* [![Dart docs](https://img.shields.io/badge/documentation-sentry.io-green.svg?label=dart%20docs)](https://docs.sentry.io/platforms/dart/)
* [![Discussions](https://img.shields.io/github/discussions/getsentry/sentry-dart.svg)](https://github.com/getsentry/sentry-dart/discussions)
* [![Discord Chat](https://img.shields.io/discord/621778831602221064?logo=discord&logoColor=ffffff&color=7389D8)](https://discord.gg/PXa5Apfe7K)
* [![Stack Overflow](https://img.shields.io/badge/stack%20overflow-sentry-green.svg)](https://stackoverflow.com/questions/tagged/sentry)
* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
* [![Twitter Follow](https://img.shields.io/twitter/follow/getsentry?label=getsentry&style=social)](https://twitter.com/intent/follow?screen_name=getsentry)
2 changes: 1 addition & 1 deletion dart/example/bin/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Future<void> decode() async {

class TagEventProcessor implements EventProcessor {
@override
SentryEvent? apply(SentryEvent event, {hint}) {
SentryEvent? apply(SentryEvent event, hint) {
return event..tags?.addAll({'page-locale': 'en-us'});
}
}
5 changes: 5 additions & 0 deletions dart/example_web/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include: package:lints/recommended.yaml

analyzer:
errors:
path_does_not_exist: ignore
2 changes: 1 addition & 1 deletion dart/example_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:

dependencies:
sentry:
path: ../../dart
path: ../../dart/

dev_dependencies:
build_runner: ^2.4.2
Expand Down
2 changes: 1 addition & 1 deletion dart/example_web/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Future<void> parseData() async {

class TagEventProcessor implements EventProcessor {
@override
SentryEvent? apply(SentryEvent event, {hint}) {
SentryEvent? apply(SentryEvent event, Hint hint) {
return event..tags?.addAll({'page-locale': 'en-us'});
}
}
21 changes: 0 additions & 21 deletions dart/lib/src/client_reports/discard_reason.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,3 @@ enum DiscardReason {
cacheOverflow,
rateLimitBackoff,
}

extension OutcomeExtension on DiscardReason {
String toStringValue() {
switch (this) {
case DiscardReason.beforeSend:
return 'before_send';
case DiscardReason.eventProcessor:
return 'event_processor';
case DiscardReason.sampleRate:
return 'sample_rate';
case DiscardReason.networkError:
return 'network_error';
case DiscardReason.queueOverflow:
return 'queue_overflow';
case DiscardReason.cacheOverflow:
return 'cache_overflow';
case DiscardReason.rateLimitBackoff:
return 'ratelimit_backoff';
}
}
}
Loading
Loading