Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
28792c6
ioClient : set a default Client
rxlabz Oct 26, 2020
a5e3fb8
options.compressPayload default value + minor
rxlabz Oct 26, 2020
4b5e8ea
captureMessage as a static method
rxlabz Oct 26, 2020
ee35bad
io example : send a formatted message
rxlabz Oct 26, 2020
51d18de
add a Dart web example
rxlabz Oct 26, 2020
f0ab2b9
changelog
rxlabz Oct 26, 2020
cc4e835
update web example
rxlabz Oct 26, 2020
c43d5bd
Merge remote-tracking branch 'origin/feature/unified-api' into fix/un…
rxlabz Oct 26, 2020
c2f89fa
Merge remote-tracking branch 'origin/feature/unified-api' into fix/un…
rxlabz Oct 26, 2020
27a8d31
add tests ( applyScope, captureMessage )
rxlabz Oct 26, 2020
070bfa5
minor
rxlabz Oct 26, 2020
eaa39e0
more applyScope tests
rxlabz Oct 26, 2020
352a270
refacto sentry client tests
rxlabz Oct 26, 2020
9c5110c
add a client.captureException test
rxlabz Oct 26, 2020
904b7b9
clean
rxlabz Oct 26, 2020
d0728c7
Update dart/examples/web_example/pubspec.yaml
rxlabz Oct 27, 2020
3f6f198
update the web example readme
rxlabz Oct 27, 2020
f5dc698
rename example methods
rxlabz Oct 27, 2020
c2e6b4d
clear the SentryOptions ctor
rxlabz Oct 27, 2020
fa1a8b1
refactor clients and update tests
rxlabz Oct 27, 2020
1f5828d
fix a test
rxlabz Oct 27, 2020
b0de53b
typo
rxlabz Oct 27, 2020
91beccc
clear tests
rxlabz Oct 27, 2020
1e36ab9
update examples
rxlabz Oct 27, 2020
d30a89b
move back example to /example ( pub.dev visibility)
rxlabz Oct 27, 2020
7b618c7
update example events
rxlabz Oct 27, 2020
edc6f35
update example events
rxlabz Oct 27, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clear the SentryOptions ctor
  • Loading branch information
rxlabz committed Oct 27, 2020
commit c2e6b4d4050543c4029368b84c8e9c2434beab13
26 changes: 15 additions & 11 deletions dart/lib/src/sentry_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,32 @@ class SentryOptions {
/// just not send any events.
String dsn;

bool _compressPayload = true;

/// If [compressPayload] is `true` the outgoing HTTP payloads are compressed
/// using gzip. Otherwise, the payloads are sent in plain UTF8-encoded JSON
/// text. If not specified, the compression is enabled by default.
bool compressPayload;
bool get compressPayload => _compressPayload;

set compressPayload(bool compressPayload) =>
_compressPayload = compressPayload ?? _compressPayload;

Client _httpClient = Client();

/// If [httpClient] is provided, it is used instead of the default client to
/// make HTTP calls to Sentry.io. This is useful in tests.
Client httpClient;
Client get httpClient => _httpClient;

set httpClient(Client httpClient) => _httpClient = httpClient ?? _httpClient;

/// If [clock] is provided, it is used to get time instead of the system
/// clock. This is useful in tests. Should be an implementation of [ClockProvider].
ClockProvider _clock;
ClockProvider _clock = getUtcDateTime;

ClockProvider get clock => _clock;

set clock(ClockProvider clock) => _clock = clock ?? _clock;

/// This variable controls the total amount of breadcrumbs that should be captured Default is 100
int maxBreadcrumbs = 100;

Expand Down Expand Up @@ -134,14 +145,7 @@ class SentryOptions {
// TODO: sendDefaultPii

// TODO: those ctor params could be set on Sentry._setDefaultConfiguration or instantiate by default here
SentryOptions({
this.dsn,
this.compressPayload = true,
this.httpClient,
ClockProvider clock = getUtcDateTime,
}) {
_clock = clock;
}
SentryOptions({this.dsn});

/// Adds an event processor
void addEventProcessor(EventProcessor eventProcessor) {
Expand Down