-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
unified fixes #148
unified fixes #148
Conversation
dart/lib/src/sentry_client.dart
Outdated
@@ -22,7 +22,13 @@ abstract class SentryClient { | |||
SentryClient.base(this._options, {String origin}) { | |||
_random = _options.sampleRate == null ? null : Random(); | |||
if (_options.transport is NoOpTransport) { | |||
_options.transport = HttpTransport(options: _options, origin: origin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marandaneto shouldn't we catch the potential Dns.parse exception ? What do you think would be the best strategy or preferred wording here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on Java we do on Sentry.init
ideally, we try to parse on https://github.com/getsentry/sentry-dart/blob/feature/unified-api/dart/lib/src/sentry.dart#L112-L121
so we crash on Sentry.init and people can fix right away
// origin is necessary for sentry to resolve stacktrace | ||
return SentryBrowserClient._(options); | ||
} | ||
factory SentryBrowserClient(SentryOptions options) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make me wonder if now we need to have a SentryBrowserClient and IOClient only because of the origin
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, we could move the origin settings in transport, and use the same strategy as for gzip compression => it will remove the need for 2 clients
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📢 Type of change
📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
🔮 Next steps