getsentry / sentry-dart-plugin

A Dart Build Plugin that uploads debug symbols for Android, iOS/macOS and source maps for Web to Sentry via sentry-cli
MIT License
68 stars 28 forks source link

sentry_dart_plugin default release version #250

Closed ekuleshov closed 4 days ago

ekuleshov commented 4 months ago

Environment

sentry_dart_plugin: 2.1.0

Steps to Reproduce

  1. run flutter packages pub run sentry_dart_plugin
  2. observe release uploaded to the Sentry web UI

Expected Result

The plugin docs says the release is constructed from the pubspec, so I'd expect release look like buildName+buildNumber.

My Sentry initialization sets release at runtime to buildName+buildNumber (matching with pubspec as it should be) and because of that uploaded symbols are not linked/not used with issues and I have two sets of releases shown in Sentry web UI.

Actual Result

The release is shown as buildName (buildNumber).

buenaflor commented 4 months ago

My Sentry initialization sets release at runtime to buildName+buildNumber

you mean the release set by default through SentryFlutter.init?

ekuleshov commented 4 months ago

you mean the release set by default through SentryFlutter.init?

That is correct

buenaflor commented 4 months ago

@denrase could you have a look pls

denrase commented 3 months ago

@ekuleshov Could you sahre the code with us where you set buildName+buildNumber? If the values from pubspec.yaml are the ones you want, you do not have to set this explicitly in options setup.

ekuleshov commented 3 months ago

I'm using the package_info_plus to get the version info:

      PackageInfo pi = await PackageInfo.fromPlatform();
      _appVersion = '${pi.version}+${pi.buildNumber}';

@ekuleshov Could you sahre the code with us where you set buildName+buildNumber? If the values from pubspec.yaml are the ones you want, you do not have to set this explicitly in options setup.

I would hope so, but uploaded artifacts wasn't linked with the app release. I've hacked it around in pubspec.yaml like this for now, but this shouldn't be required.

version: &ver 2.0.7+32
...
sentry:
  ...
  release: *ver
  ...
denrase commented 3 months ago

Thx, i'll try to reproduce this. How exactly are you using _appVersion in relation to the Sentry SDK?

buenaflor commented 4 days ago

let us know if this is still an issue