getsentry / sentry-dart

Sentry SDK for Dart and Flutter
https://sentry.io/for/flutter/
MIT License
761 stars 239 forks source link

Sentry Environment declared on flutter app not refleced on dashboard #2226

Closed achego closed 2 months ago

achego commented 3 months ago

Platform

Flutter Mobile

Obfuscation

Enabled

Debug Info

Enabled

Doctor

[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-arm64, locale en-NG) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.92.1) [✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Version

8.6.0

Steps to Reproduce

  1. Initilize the sentry environment ` await SentryFlutter.init( (options) { options ..dsn = config.dsn ?? EnvProd.sentryDns

        ..captureFailedRequests = config.captureFailedRequests ?? false
        ..debug =  false
        ..enableTimeToFullDisplayTracing = false
        ..profilesSampleRate = 1
        ..environment =  FlavorConfig.instance?.envName ?? 'staging'
        ..tracesSampleRate =  1
        ..autoAppStart = false;
    },
    appRunner: () {
      runApp(app);
    
    },

    ); `

  2. Simulate an error using the Sentry.captureException() method Sentry.captureException( throwable, stackTrace: stackTrace, withScope: (scope) { scope ..setTag('error-origin', tag.name) ..level = level; }, );

But on the dasbord i just have a debug environment

Expected Result

on the dasboard im supposed to either have a stating or production environment

Actual Result

i just have the debug environment

Are you willing to submit a PR?

None

buenaflor commented 3 months ago

hi can you send me a sample event to giancarlo.buenaflor@sentry.io

I have tested this locally and it works in init with options.environment = 'custom env'

getsantry[bot] commented 2 months ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀