Skip to content
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

Use dynamic version and release for sentry properties in pubsepc.yaml #275

Closed
nrajput05 opened this issue Nov 4, 2024 · 2 comments
Closed

Comments

@nrajput05
Copy link

nrajput05 commented Nov 4, 2024

I have 3 questions regarding the sentry properties and debug symbols:

  • 1
    I am using sentry properties in my pubsepc.yaml. In there, we have to specify release and dist keys. My understanding is that the release is the version of the app and the dist is the build number as in 2.0.0(3) is the full version where 2.0.0 is the release and 3 is the dist. Is this understanding correct?

  • 2
    How can I set the release and dist keys with dynamic versions? Is it possible to refer the pubsepc.yaml file's "version: 2.0.0+3" key?

  • 3
    Once the flutter web app is built and uploaded to server, all the crashes are reported with minified stack trace. I was hoping once I build the app and execute flutter packages pub run sentry_dart_plugin with correct version in sentry properties, the stack trace won't be minified since I have uploaded the debug symbols.

This is how my sentry properties file looks like in pubsepc.yaml file:

sentry:
    upload_debug_symbols: true # For mobile apps
    upload_source_maps: true # For better readability of errors on the web
    upload_sources: false # Keeping it false as of now to avoid source code in the errors
    project: 'xxxxxx'
    org: 'xxxxxx'
    auth_token: 'xxxxxx'
    #    url: https://sentry.io/ 
    wait_for_processing: true # Wait for server side processing to surely know that debug symbols are uploaded
    log_level: error # Possible values are trace, debug, info, warn, and error.
    release: 2.0.0  # This refers to the version defined above
    dist: 2.0.0+3  # Includes the build number
    #    web_build_path: build/web/ # Might not be needed.
    commits: auto # Linking Git commits with errors
    ignore_missing: true
@buenaflor
Copy link
Contributor

buenaflor commented Nov 18, 2024

I am using sentry properties in my pubsepc.yaml. In there, we have to specify release and dist keys. My understanding is that the release is the version of the app and the dist is the build number as in 2.0.0(3) is the full version where 2.0.0 is the release and 3 is the dist. Is this understanding correct?

Yes 3 would be the build number although it is not required to have it

How can I set the release and dist keys with dynamic versions? Is it possible to refer the pubsepc.yaml file's "version: 2.0.0+3" key?

I'm not sure what you mean, do you mean how to dynamically update the release version?

all the crashes are reported with minified stack trace

the dist should only be the build number

release: 2.0.0 
dist: 3 

and you have to be sure that it matches the config in your Flutter app

maybe you can also post your SentryFlutter.init config

@nrajput05
Copy link
Author

I'm not sure what you mean, do you mean how to dynamically update the release version?

I meant if I don't set these values then whatever is written on top of my pubspec.yaml file, that version and build number will be picked. I tried and yes it worked like that. No need to define separately.

Also the stack trace for web only worked if I use upload_sources: true which uploads my source code to sentry.

@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants