-
-
Notifications
You must be signed in to change notification settings - Fork 277
APM for isar #1726
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
APM for isar #1726
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
fb09b38
setup
denrase 8cefb7e
introduce wrappers for isar and isar_collection, wrap all async methods
denrase cc31e4b
Merge branch 'main' into feat/isar
denrase 2420ec9
correctly setup tests
denrase d780a41
test isar & isar collection
denrase 452015f
test throwing isar collection methods
denrase 4ba63b6
add workflow for tests
denrase 988ca81
also bump isar version
denrase 2385a2e
add commented oout entry to craft.yml
denrase 7910e51
Update example app
denrase 5ee8639
Update examples
denrase b390fae
Add changelog entry
denrase fe19113
run format
denrase 0b81c7f
Merge branch 'main' into feat/isar
denrase 1caeb4a
fix readme
denrase 9bf5a6d
remove separate isar import
denrase 30e6254
add back isar dependency (used in tests)
denrase 7961474
add generated person.g
denrase 770a4e3
update workflows
denrase a47a830
add coverage to gitignore
denrase 61cf436
ignore warning in generated mock code
denrase ead1481
change min coverage to 55
denrase 30fdfa4
Add workaround for issue where UserSchema leads to compile issue on web
denrase 2d4e12e
Merge branch 'main' into feat/isar
denrase 23abf7e
fix changelog
denrase a4b42fa
update readme files
denrase 34920d4
Merge branch 'main' into feat/isar
denrase 65b6531
Merge branch 'main' into feat/isar
denrase 20e3f8c
fix changelog
denrase 525d3f8
Merge branch 'main' into feat/isar
denrase cbbaae8
fix changelog
denrase 20d53f5
remove isar generator because of test failure on macOS (missing isar …
denrase File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Omit committing pubspec.lock for library packages; see | ||
| # https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
| pubspec.lock | ||
|
|
||
| # Flutter/Dart/Pub related | ||
| **/doc/api/ | ||
| **/ios/Flutter/.last_build_id | ||
| .dart_tool/ | ||
| .flutter-plugins | ||
| .flutter-plugins-dependencies | ||
| .packages | ||
| .pub-cache/ | ||
| .pub/ | ||
| /build/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # This file tracks properties of this Flutter project. | ||
| # Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
| # | ||
| # This file should be version controlled and should not be manually edited. | ||
|
|
||
| version: | ||
| revision: "2f708eb8396e362e280fac22cf171c2cb467343c" | ||
| channel: "stable" | ||
|
|
||
| project_type: package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../CHANGELOG.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2019 Sentry | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <p align="center"> | ||
| <a href="https://sentry.io" target="_blank" align="center"> | ||
| <img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280"> | ||
| </a> | ||
| <br /> | ||
| </p> | ||
|
|
||
| Sentry integration for `isar` package | ||
| =========== | ||
|
|
||
| | package | build | pub | likes | popularity | pub points | | ||
| | ------- | ------- | ------- | ------- | ------- | ------- | | ||
| | sentry_isar | [](https://github.com/getsentry/sentry-dart/actions?query=workflow%3Asentry-isar) | [](https://pub.dev/packages/sentry_isar) | [](https://pub.dev/packages/sentry_isar/score) | [](https://pub.dev/packages/sentry_isar/score) | [](https://pub.dev/packages/sentry_isar/score) | ||
|
|
||
| Integration for the [`isar`](https://pub.dev/packages/isar) package. | ||
|
|
||
| #### Usage | ||
|
|
||
| - Sign up for a Sentry.io account and get a DSN at https://sentry.io. | ||
|
|
||
| - Follow the installing instructions on [pub.dev](https://pub.dev/packages/sentry/install). | ||
|
|
||
| - Initialize the Sentry SDK using the DSN issued by Sentry.io. | ||
|
|
||
| - Call... | ||
|
|
||
| ```dart | ||
| import 'package:sentry_flutter/sentry_flutter.dart'; | ||
| import 'package:sentry_isar/sentry_isar.dart'; | ||
|
|
||
| Future<void> main() async { | ||
| await SentryFlutter.init( | ||
| (options) { | ||
| options.dsn = 'https://[email protected]/add-your-dsn-here'; | ||
| options.tracesSampleRate = 1.0; | ||
| }, | ||
| // Init your App. | ||
| appRunner: () => runApp(MyApp()), | ||
| ); | ||
| } | ||
|
|
||
| // TODO: Example | ||
|
|
||
| ``` | ||
|
|
||
| #### Resources | ||
|
|
||
| * [](https://docs.sentry.io/platforms/dart/) | ||
| * [](https://forum.sentry.io/c/sdks) | ||
| * [](https://discord.gg/Ww9hbqr) | ||
| * [](https://stackoverflow.com/questions/tagged/sentry) | ||
| * [](https://twitter.com/intent/follow?screen_name=getsentry) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| include: package:lints/recommended.yaml | ||
|
|
||
| analyzer: | ||
| language: | ||
| strict-casts: true | ||
| strict-inference: true | ||
| strict-raw-types: true | ||
| errors: | ||
| # treat missing required parameters as a warning (not a hint) | ||
| missing_required_param: error | ||
| # treat missing returns as a warning (not a hint) | ||
| missing_return: error | ||
| # allow having TODOs in the code | ||
| todo: ignore | ||
| # allow self-reference to deprecated members (we do this because otherwise we have | ||
| # to annotate every member in every test, assert, etc, when we deprecate something) | ||
| deprecated_member_use_from_same_package: warning | ||
| # ignore sentry/path on pubspec as we change it on deployment | ||
| invalid_dependency: ignore | ||
| unnecessary_import: ignore | ||
denrase marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| exclude: | ||
| - example/** | ||
|
|
||
| linter: | ||
| rules: | ||
| - prefer_final_locals | ||
| - public_member_api_docs | ||
| - prefer_single_quotes | ||
| - prefer_relative_imports | ||
| - unnecessary_brace_in_string_interps | ||
| - implementation_imports | ||
| - require_trailing_commas | ||
| - unawaited_futures | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../dart/dartdoc_options.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| library sentry_isar; | ||
|
|
||
| /// A Calculator. | ||
| class SentryIsar { | ||
| /// Returns [value] plus 1. | ||
| int addOne(int value) => value + 1; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: sentry_isar | ||
| description: An integration which adds support for performance tracing for the isar package. | ||
| version: 7.12.0 | ||
| homepage: https://docs.sentry.io/platforms/flutter/ | ||
| repository: https://github.com/getsentry/sentry-dart | ||
| issue_tracker: https://github.com/getsentry/sentry-dart/issues | ||
|
|
||
| environment: | ||
| sdk: '>=2.17.0 <4.0.0' | ||
| flutter: '>=3.3.0' | ||
|
|
||
| dependencies: | ||
| isar: 3.1.0 | ||
| isar_flutter_libs: 3.1.0 # contains Isar Core | ||
| sentry: 7.12.0 | ||
| meta: ^1.3.0 | ||
| path: ^1.8.3 | ||
|
|
||
| dev_dependencies: | ||
| isar_generator: 3.1.0 | ||
| build_runner: ^2.4.2 | ||
| lints: ^3.0.0 | ||
| flutter_test: | ||
| sdk: flutter | ||
| coverage: ^1.3.0 | ||
| mockito: ^5.1.0 | ||
| yaml: ^3.1.0 # needed for version match (code and pubspec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| dependency_overrides: | ||
| sentry: | ||
| path: ../dart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import 'package:flutter_test/flutter_test.dart'; | ||
| import 'package:sentry_isar/sentry_isar.dart'; | ||
|
|
||
| void main() { | ||
| test('adds one to input values', () { | ||
| final calculator = SentryIsar(); | ||
| expect(calculator.addOne(2), 3); | ||
| expect(calculator.addOne(-7), -6); | ||
| expect(calculator.addOne(0), 1); | ||
| }); | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.