Skip to content
Prev Previous commit
Next Next commit
set a default environment
  • Loading branch information
rxlabz committed Oct 27, 2020
commit 74e54e14aeee50fdf30c00399ed9674fc0f3d665
3 changes: 2 additions & 1 deletion dart/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ abstract class SentryClient {
SentryEvent _prepareEvent(SentryEvent event) => event.copyWith(
serverName: event.serverName ?? _options.serverName,
dist: event.dist ?? _options.dist,
environment: event.environment ?? _options.environment,
environment:
event.environment ?? _options.environment ?? defaultEnvironment,
release: event.release ?? _options.release,
platform: event.platform ?? sdkPlatform,
);
Expand Down
2 changes: 2 additions & 0 deletions dart/lib/src/sentry_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import 'hub.dart';
import 'protocol.dart';
import 'utils.dart';

const defaultEnvironment = 'production';

/// Sentry SDK options
class SentryOptions {
/// Default Log level if not specified Default is DEBUG
Expand Down