Skip to content

Commit f63ac27

Browse files
committed
revert environmentAttributes renaming
1 parent 02d0918 commit f63ac27

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

dart/lib/src/browser_client.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import 'version.dart';
1717

1818
SentryClient createSentryClient({
1919
@required String dsn,
20-
Event environment,
20+
Event environmentAttributes,
2121
bool compressPayload,
2222
Client httpClient,
2323
dynamic clock,
2424
UuidGenerator uuidGenerator,
2525
}) =>
2626
SentryBrowserClient(
2727
dsn: dsn,
28-
environment: environment,
28+
environmentAttributes: environmentAttributes,
2929
httpClient: httpClient,
3030
clock: clock,
3131
uuidGenerator: uuidGenerator,
@@ -36,7 +36,7 @@ class SentryBrowserClient extends SentryClient {
3636
/// Instantiates a client using [dsn] issued to your project by Sentry.io as
3737
/// the endpoint for submitting events.
3838
///
39-
/// [environment] contain event attributes that do not change over
39+
/// [environmentAttributes] contain event attributes that do not change over
4040
/// the course of a program's lifecycle. These attributes will be added to
4141
/// all events captured via this client. The following attributes often fall
4242
/// under this category: [Event.serverName], [Event.release], [Event.environment].
@@ -55,7 +55,7 @@ class SentryBrowserClient extends SentryClient {
5555
/// tests.
5656
factory SentryBrowserClient({
5757
@required String dsn,
58-
Event environment,
58+
Event environmentAttributes,
5959
Client httpClient,
6060
dynamic clock,
6161
UuidGenerator uuidGenerator,
@@ -72,7 +72,7 @@ class SentryBrowserClient extends SentryClient {
7272
httpClient: httpClient,
7373
clock: clock,
7474
uuidGenerator: uuidGenerator,
75-
environment: environment,
75+
environmentAttributes: environmentAttributes,
7676
dsn: dsn,
7777
origin: origin,
7878
platform: browserPlatform,
@@ -83,15 +83,15 @@ class SentryBrowserClient extends SentryClient {
8383
Client httpClient,
8484
dynamic clock,
8585
UuidGenerator uuidGenerator,
86-
Event environment,
86+
Event environmentAttributes,
8787
String dsn,
8888
String platform,
8989
String origin,
9090
}) : super.base(
9191
httpClient: httpClient,
9292
clock: clock,
9393
uuidGenerator: uuidGenerator,
94-
environment: environment,
94+
environmentAttributes: environmentAttributes,
9595
dsn: dsn,
9696
platform: platform,
9797
origin: origin,

dart/lib/src/client.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ abstract class SentryClient {
2323
/// `dart:html` is available, otherwise it will throw an unsupported error.
2424
factory SentryClient({
2525
@required String dsn,
26-
Event environment,
26+
Event environmentAttributes,
2727
bool compressPayload,
2828
Client httpClient,
2929
dynamic clock,
3030
UuidGenerator uuidGenerator,
3131
}) =>
3232
createSentryClient(
3333
dsn: dsn,
34-
environment: environment,
34+
environmentAttributes: environmentAttributes,
3535
httpClient: httpClient,
3636
clock: clock,
3737
uuidGenerator: uuidGenerator,
@@ -43,7 +43,7 @@ abstract class SentryClient {
4343
dynamic clock,
4444
UuidGenerator uuidGenerator,
4545
String dsn,
46-
this.environment,
46+
this.environmentAttributes,
4747
String platform,
4848
this.origin,
4949
Sdk sdk,
@@ -71,7 +71,7 @@ abstract class SentryClient {
7171
/// event to event, such as local operating system version, the version of
7272
/// Dart/Flutter SDK, etc. These attributes have lower precedence than those
7373
/// supplied in the even passed to [capture].
74-
final Event environment;
74+
final Event environmentAttributes;
7575

7676
final Dsn _dsn;
7777

@@ -155,8 +155,8 @@ abstract class SentryClient {
155155
'timestamp': formatDateAsIso8601WithSecondPrecision(now),
156156
};
157157

158-
if (environment != null) {
159-
mergeAttributes(environment.toJson(), into: data);
158+
if (environmentAttributes != null) {
159+
mergeAttributes(environmentAttributes.toJson(), into: data);
160160
}
161161

162162
// Merge the user context.

dart/lib/src/client_stub.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'utils.dart';
1212
/// Implemented in `browser_client.dart` and `io_client.dart`.
1313
SentryClient createSentryClient({
1414
@required String dsn,
15-
Event environment,
15+
Event environmentAttributes,
1616
bool compressPayload,
1717
Client httpClient,
1818
dynamic clock,

dart/lib/src/io_client.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ import 'version.dart';
1616

1717
SentryClient createSentryClient({
1818
@required String dsn,
19-
Event environment,
19+
Event environmentAttributes,
2020
bool compressPayload,
2121
Client httpClient,
2222
dynamic clock,
2323
UuidGenerator uuidGenerator,
2424
}) =>
2525
SentryIOClient(
2626
dsn: dsn,
27-
environment: environment,
27+
environmentAttributes: environmentAttributes,
2828
compressPayload: compressPayload,
2929
httpClient: httpClient,
3030
clock: clock,
@@ -36,7 +36,7 @@ class SentryIOClient extends SentryClient {
3636
/// Instantiates a client using [dsn] issued to your project by Sentry.io as
3737
/// the endpoint for submitting events.
3838
///
39-
/// [environment] contain event attributes that do not change over
39+
/// [environmentAttributes] contain event attributes that do not change over
4040
/// the course of a program's lifecycle. These attributes will be added to
4141
/// all events captured via this client. The following attributes often fall
4242
/// under this category: [Event.serverName], [Event.release], [Event.environment].
@@ -59,7 +59,7 @@ class SentryIOClient extends SentryClient {
5959
/// tests.
6060
factory SentryIOClient({
6161
@required String dsn,
62-
Event environment,
62+
Event environmentAttributes,
6363
bool compressPayload,
6464
Client httpClient,
6565
dynamic clock,
@@ -74,7 +74,7 @@ class SentryIOClient extends SentryClient {
7474
httpClient: httpClient,
7575
clock: clock,
7676
uuidGenerator: uuidGenerator,
77-
environment: environment,
77+
environmentAttributes: environmentAttributes,
7878
dsn: dsn,
7979
compressPayload: compressPayload,
8080
platform: sdkPlatform,
@@ -85,7 +85,7 @@ class SentryIOClient extends SentryClient {
8585
Client httpClient,
8686
dynamic clock,
8787
UuidGenerator uuidGenerator,
88-
Event environment,
88+
Event environmentAttributes,
8989
String dsn,
9090
this.compressPayload = true,
9191
String platform,
@@ -94,7 +94,7 @@ class SentryIOClient extends SentryClient {
9494
httpClient: httpClient,
9595
clock: clock,
9696
uuidGenerator: uuidGenerator,
97-
environment: environment,
97+
environmentAttributes: environmentAttributes,
9898
dsn: dsn,
9999
platform: platform,
100100
origin: origin,

dart/lib/src/sentry.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Sentry {
2121
optionsConfiguration(options);
2222
_client = SentryClient(
2323
dsn: options.dsn,
24-
environment: options.environment,
24+
environmentAttributes: options.environmentAttributes,
2525
compressPayload: options.compressPayload,
2626
httpClient: options.httpClient,
2727
clock: options.clock,

dart/lib/src/sentry_options.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SentryOptions {
1919
/// event to event, such as local operating system version, the version of
2020
/// Dart/Flutter SDK, etc. These attributes have lower precedence than those
2121
/// supplied in the even passed to [capture].
22-
Event environment;
22+
Event environmentAttributes;
2323

2424
/// If [compressPayload] is `true` the outgoing HTTP payloads are compressed
2525
/// using gzip. Otherwise, the payloads are sent in plain UTF8-encoded JSON
@@ -44,7 +44,7 @@ class SentryOptions {
4444

4545
SentryOptions({
4646
this.dsn,
47-
this.environment,
47+
this.environmentAttributes,
4848
this.compressPayload,
4949
this.httpClient,
5050
this.clock,

dart/test/test_utils.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Future testCaptureException(
7575
clock: fakeClockProvider,
7676
uuidGenerator: () => 'X' * 32,
7777
compressPayload: compressPayload,
78-
environment: const Event(
78+
environmentAttributes: const Event(
7979
serverName: 'test.server.com',
8080
release: '1.2.3',
8181
environment: 'staging',
@@ -235,7 +235,7 @@ void runTest({Codec<List<int>, List<int>> gzip, bool isWeb = false}) {
235235
clock: fakeClockProvider,
236236
compressPayload: false,
237237
uuidGenerator: () => 'X' * 32,
238-
environment: const Event(
238+
environmentAttributes: const Event(
239239
serverName: 'test.server.com',
240240
release: '1.2.3',
241241
environment: 'staging',
@@ -293,7 +293,7 @@ void runTest({Codec<List<int>, List<int>> gzip, bool isWeb = false}) {
293293
clock: fakeClockProvider,
294294
uuidGenerator: () => 'X' * 32,
295295
compressPayload: false,
296-
environment: const Event(
296+
environmentAttributes: const Event(
297297
serverName: 'test.server.com',
298298
release: '1.2.3',
299299
environment: 'staging',
@@ -350,7 +350,7 @@ void runTest({Codec<List<int>, List<int>> gzip, bool isWeb = false}) {
350350
clock: fakeClockProvider,
351351
uuidGenerator: () => 'X' * 32,
352352
compressPayload: false,
353-
environment: const Event(
353+
environmentAttributes: const Event(
354354
serverName: 'test.server.com',
355355
release: '1.2.3',
356356
environment: 'staging',

0 commit comments

Comments
 (0)