Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
rename every environmentAttributes to environment
  • Loading branch information
rxlabz committed Oct 14, 2020
commit 83c59d4ef5bb33c6c70fd3343537450439145faa
14 changes: 7 additions & 7 deletions dart/lib/src/browser_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import 'version.dart';

SentryClient createSentryClient({
@required String dsn,
Event environmentAttributes,
Event environment,
bool compressPayload,
Client httpClient,
dynamic clock,
UuidGenerator uuidGenerator,
}) =>
SentryBrowserClient(
dsn: dsn,
environmentAttributes: environmentAttributes,
environment: environment,
httpClient: httpClient,
clock: clock,
uuidGenerator: uuidGenerator,
Expand All @@ -36,7 +36,7 @@ class SentryBrowserClient extends SentryClient {
/// Instantiates a client using [dsn] issued to your project by Sentry.io as
/// the endpoint for submitting events.
///
/// [environmentAttributes] contain event attributes that do not change over
/// [environment] contain event attributes that do not change over
/// the course of a program's lifecycle. These attributes will be added to
/// all events captured via this client. The following attributes often fall
/// under this category: [Event.serverName], [Event.release], [Event.environment].
Expand All @@ -55,7 +55,7 @@ class SentryBrowserClient extends SentryClient {
/// tests.
factory SentryBrowserClient({
@required String dsn,
Event environmentAttributes,
Event environment,
Client httpClient,
dynamic clock,
UuidGenerator uuidGenerator,
Expand All @@ -72,7 +72,7 @@ class SentryBrowserClient extends SentryClient {
httpClient: httpClient,
clock: clock,
uuidGenerator: uuidGenerator,
environmentAttributes: environmentAttributes,
environment: environment,
dsn: dsn,
origin: origin,
platform: browserPlatform,
Expand All @@ -83,15 +83,15 @@ class SentryBrowserClient extends SentryClient {
Client httpClient,
dynamic clock,
UuidGenerator uuidGenerator,
Event environmentAttributes,
Event environment,
String dsn,
String platform,
String origin,
}) : super.base(
httpClient: httpClient,
clock: clock,
uuidGenerator: uuidGenerator,
environmentAttributes: environmentAttributes,
environment: environment,
dsn: dsn,
platform: platform,
origin: origin,
Expand Down
10 changes: 5 additions & 5 deletions dart/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class SentryClient {
}) =>
createSentryClient(
dsn: dsn,
environmentAttributes: environment,
environment: environment,
httpClient: httpClient,
clock: clock,
uuidGenerator: uuidGenerator,
Expand All @@ -43,7 +43,7 @@ abstract class SentryClient {
dynamic clock,
UuidGenerator uuidGenerator,
String dsn,
this.environmentAttributes,
this.environment,
String platform,
this.origin,
Sdk sdk,
Expand Down Expand Up @@ -71,7 +71,7 @@ abstract class SentryClient {
/// event to event, such as local operating system version, the version of
/// Dart/Flutter SDK, etc. These attributes have lower precedence than those
/// supplied in the even passed to [capture].
final Event environmentAttributes;
final Event environment;

final Dsn _dsn;

Expand Down Expand Up @@ -155,8 +155,8 @@ abstract class SentryClient {
'timestamp': formatDateAsIso8601WithSecondPrecision(now),
};

if (environmentAttributes != null) {
mergeAttributes(environmentAttributes.toJson(), into: data);
if (environment != null) {
mergeAttributes(environment.toJson(), into: data);
}

// Merge the user context.
Expand Down
2 changes: 1 addition & 1 deletion dart/lib/src/client_stub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'utils.dart';
/// Implemented in `browser_client.dart` and `io_client.dart`.
SentryClient createSentryClient({
@required String dsn,
Event environmentAttributes,
Event environment,
bool compressPayload,
Client httpClient,
dynamic clock,
Expand Down
14 changes: 7 additions & 7 deletions dart/lib/src/io_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import 'version.dart';

SentryClient createSentryClient({
@required String dsn,
Event environmentAttributes,
Event environment,
bool compressPayload,
Client httpClient,
dynamic clock,
UuidGenerator uuidGenerator,
}) =>
SentryIOClient(
dsn: dsn,
environmentAttributes: environmentAttributes,
environment: environment,
compressPayload: compressPayload,
httpClient: httpClient,
clock: clock,
Expand All @@ -36,7 +36,7 @@ class SentryIOClient extends SentryClient {
/// Instantiates a client using [dsn] issued to your project by Sentry.io as
/// the endpoint for submitting events.
///
/// [environmentAttributes] contain event attributes that do not change over
/// [environment] contain event attributes that do not change over
/// the course of a program's lifecycle. These attributes will be added to
/// all events captured via this client. The following attributes often fall
/// under this category: [Event.serverName], [Event.release], [Event.environment].
Expand All @@ -59,7 +59,7 @@ class SentryIOClient extends SentryClient {
/// tests.
factory SentryIOClient({
@required String dsn,
Event environmentAttributes,
Event environment,
bool compressPayload,
Client httpClient,
dynamic clock,
Expand All @@ -74,7 +74,7 @@ class SentryIOClient extends SentryClient {
httpClient: httpClient,
clock: clock,
uuidGenerator: uuidGenerator,
environmentAttributes: environmentAttributes,
environment: environment,
dsn: dsn,
compressPayload: compressPayload,
platform: sdkPlatform,
Expand All @@ -85,7 +85,7 @@ class SentryIOClient extends SentryClient {
Client httpClient,
dynamic clock,
UuidGenerator uuidGenerator,
Event environmentAttributes,
Event environment,
String dsn,
this.compressPayload = true,
String platform,
Expand All @@ -94,7 +94,7 @@ class SentryIOClient extends SentryClient {
httpClient: httpClient,
clock: clock,
uuidGenerator: uuidGenerator,
environmentAttributes: environmentAttributes,
environment: environment,
dsn: dsn,
platform: platform,
origin: origin,
Expand Down