Sentry-dart: Change SDK Name based on the platform

Created on 5 Oct 2020  路  11Comments  路  Source: getsentry/sentry-dart

enhancement

Most helpful comment

This comment: https://github.com/getsentry/sentry-dart/pull/103#discussion_r502498630

Today what we have is a step forward but still we're not there.

sentry.dart.browser makes when Dart is compiled to JS and runs on the browser. That is not the case for Flutter Web. So for Flutter Web we would still want to have sentry.dart.flutter. On Flutter we can add a tag to identify if it's ios/android/web/windows etc. Maybe flutter.platform=....

All 11 comments

right now it's sentry.dart for flutter, dart and web.
ideally we'd have sentry.dart, sentry.dart.flutter, sentry.dart.browser.
right now it's controlled by https://github.com/getsentry/sentry-dart/blob/main/dart/lib/src/version.dart

on Android/Java we do it thru the build system using Gradle plugins and code generation: https://github.com/getsentry/sentry-java/blob/main/sentry/build.gradle.kts#L75-L76
let's timebox this and do at a later point if it's not easy/fast

Here we vary the client based on platform. That'll work for sentry.dart.browser, that could be set on the SentryBrowserClient class and sentry.dart on the SentryIoClient.

For Flutter we can pass the sdk.name through init when when the sentry_flutter package calls init in the sentry package.

cool, so we could start with this for sentry.dart.browser and sentry.dart but tackling sentry.dart.flutter in the next sprint as its focused on flutter, thanks!

fixed in #96

fixed in #96

wrong PR? I don't see any commits or review about it (Change SDK Name based on the platform) on #96 ?

@marandaneto thanks, and sorry, I need more coffee this morning :s

@marandaneto thanks, and sorry, I need more coffee this morning :s

no worries, are you working on that then?

yes, I started to dive in the NNBD issue, but I'll focus on this one first !

This comment: https://github.com/getsentry/sentry-dart/pull/103#discussion_r502498630

Today what we have is a step forward but still we're not there.

sentry.dart.browser makes when Dart is compiled to JS and runs on the browser. That is not the case for Flutter Web. So for Flutter Web we would still want to have sentry.dart.flutter. On Flutter we can add a tag to identify if it's ios/android/web/windows etc. Maybe flutter.platform=....

Was this page helpful?
0 / 5 - 0 ratings