Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a10d740
remove the SentryResponse class
rxlabz Oct 21, 2020
623c904
refactor : add a Transport class
rxlabz Oct 21, 2020
0dcb613
refactor : move the clock initialization to Transport
rxlabz Oct 21, 2020
c97c98b
- refactor : applyScope
rxlabz Oct 21, 2020
477fdac
changelog
rxlabz Oct 21, 2020
b8fb322
fix merge conflicts
rxlabz Oct 22, 2020
fd92e3f
Merge branch 'feature/unified-api' into ref/transport
rxlabz Oct 22, 2020
0944c68
move the headers definition strategy to transport
rxlabz Oct 22, 2020
46829fc
- Instantiate Transport from options
rxlabz Oct 22, 2020
01d4e19
handle event dropping in event processors
rxlabz Oct 22, 2020
fbd001e
fix client._applyScope : merge event and scope tags and extra
rxlabz Oct 22, 2020
4d39531
remove client.toString()
rxlabz Oct 22, 2020
34fb528
fix a test
rxlabz Oct 22, 2020
2437fa4
Merge branch 'feature/unified-api' into ref/transport
rxlabz Oct 22, 2020
57798f5
handle the event serialization in the transport layer
rxlabz Oct 22, 2020
789e154
Merge remote-tracking branch 'origin/feature/unified-api' into ref/tr…
rxlabz Oct 22, 2020
1aa05d6
remove stackFrameFilter references
rxlabz Oct 22, 2020
9895142
Merge remote-tracking branch 'origin/feature/unified-api' into ref/tr…
rxlabz Oct 22, 2020
cb5e309
add a CredentialBuilder
rxlabz Oct 22, 2020
e563d2c
- headers configuration
rxlabz Oct 23, 2020
71b53c8
- fix scope.level precedence
rxlabz Oct 23, 2020
be3f0a2
buildHeaders and fix timestamp test
rxlabz Oct 23, 2020
43b798c
- add a isWeb helper to define the event.platform
rxlabz Oct 23, 2020
19dc91d
feat: apply sample rate
marandaneto Oct 23, 2020
cec1f21
changelog
marandaneto Oct 23, 2020
909d4f9
- add a isWeb helper to define the event.platform and sdkName
rxlabz Oct 23, 2020
8b600dc
- add a isWeb helper to define the event.platform and sdkName
rxlabz Oct 23, 2020
4ff58a6
Merge remote-tracking branch 'origin/feat/sample-rate' into ref/trans…
rxlabz Oct 23, 2020
5493e19
fix
marandaneto Oct 23, 2020
621d6c4
update tests
rxlabz Oct 23, 2020
e11f653
Merge remote-tracking branch 'origin/feat/sample-rate' into ref/trans…
rxlabz Oct 23, 2020
88526e2
remove the platform arg from Client ctor
rxlabz Oct 23, 2020
796b633
set client.options private
rxlabz Oct 23, 2020
fb8b9e0
remove event.platform redefinition
rxlabz Oct 23, 2020
1dbcba4
set options.sdk if null
rxlabz Oct 23, 2020
8b56bce
remove fields from Transport Api
rxlabz Oct 23, 2020
daeb29e
private version consts
rxlabz Oct 23, 2020
098d58c
remove transport from the Client ctor
rxlabz Oct 23, 2020
2833a94
remove options.environmentAttributes
rxlabz Oct 23, 2020
35671d4
event processing : platform
rxlabz Oct 23, 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
set options.sdk if null
  • Loading branch information
rxlabz committed Oct 23, 2020
commit 1dbcba4eb97a9bcc1d6b54f44f0c3de09daa784d
14 changes: 8 additions & 6 deletions dart/lib/src/browser_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import 'dart:html' show window;
import 'package:http/browser_client.dart';

import 'client.dart';
import 'protocol.dart';
import 'sentry_options.dart';
import 'version.dart';

SentryClient createSentryClient(SentryOptions options) =>
SentryBrowserClient(options);
Expand All @@ -25,15 +27,15 @@ class SentryBrowserClient extends SentryClient {
///
/// If [httpClient] is provided, it is used instead of the default client to
/// make HTTP calls to Sentry.io. This is useful in tests.
factory SentryBrowserClient(SentryOptions options, {String origin}) {
factory SentryBrowserClient(SentryOptions options) {
options.httpClient ??= BrowserClient();

options.sdk ??= Sdk(name: sdkName, version: sdkVersion);

// origin is necessary for sentry to resolve stacktrace
return SentryBrowserClient._(options, origin: origin);
return SentryBrowserClient._(options);
}

SentryBrowserClient._(
SentryOptions options, {
String origin,
}) : super.base(options, origin: '${window.location.origin}/');
SentryBrowserClient._(SentryOptions options)
: super.base(options, origin: '${window.location.origin}/');
}
2 changes: 1 addition & 1 deletion dart/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class SentryClient {
if (_options.transport is NoOpTransport) {
_options.transport = Transport(
options: _options,
sdkIdentifier: '${sdkName}/${sdkVersion}',
sdkIdentifier: _options.sdk.identifier,
origin: origin,
);
}
Expand Down
7 changes: 6 additions & 1 deletion dart/lib/src/io_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:sentry/sentry.dart';

/// A pure Dart client for Sentry.io crash reporting.
import 'client.dart';
import 'sentry_options.dart';
Expand All @@ -12,7 +14,10 @@ SentryClient createSentryClient(SentryOptions options) =>
/// Logs crash reports and events to the Sentry.io service.
class SentryIOClient extends SentryClient {
/// Instantiates a client using [SentryOptions]
factory SentryIOClient(SentryOptions options) => SentryIOClient._(options);
factory SentryIOClient(SentryOptions options) {
options.sdk ??= Sdk(name: sdkName, version: sdkVersion);
return SentryIOClient._(options);
}

SentryIOClient._(SentryOptions options) : super.base(options);
}
4 changes: 2 additions & 2 deletions dart/lib/src/sentry_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class SentryOptions {
/// The server name used in the Sentry messages.
String serverName;

/// SdkVersion object that contains the Sentry Client Name and its version
Sdk sdkVersion;
/// Sdk object that contains the Sentry Client Name and its version
Sdk sdk;

// TODO: Scope observers, enableScopeSync

Expand Down