Skip to content

Commit 6e599fb

Browse files
committed
renames
1 parent 50994d4 commit 6e599fb

File tree

9 files changed

+41
-38
lines changed

9 files changed

+41
-38
lines changed

dart/lib/src/hub.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ class Hub {
452452
);
453453
}
454454

455-
Profiler? profiler;
455+
SentryProfiler? profiler;
456456
if (_profilerFactory != null &&
457457
_tracesSampler.sampleProfiling(samplingDecision)) {
458458
profiler = _profilerFactory?.startProfiler(transactionContext);
@@ -563,12 +563,12 @@ class Hub {
563563
_throwableToSpan.add(throwable, span, transaction);
564564

565565
@internal
566-
ProfilerFactory? get profilerFactory => _profilerFactory;
566+
SentryProfilerFactory? get profilerFactory => _profilerFactory;
567567

568568
@internal
569-
set profilerFactory(ProfilerFactory? value) => _profilerFactory = value;
569+
set profilerFactory(SentryProfilerFactory? value) => _profilerFactory = value;
570570

571-
ProfilerFactory? _profilerFactory;
571+
SentryProfilerFactory? _profilerFactory;
572572

573573
SentryEvent _assignTraceContext(SentryEvent event) {
574574
// assign trace context

dart/lib/src/hub_adapter.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,13 @@ class HubAdapter implements Hub {
171171

172172
@internal
173173
@override
174-
set profilerFactory(ProfilerFactory? value) =>
174+
set profilerFactory(SentryProfilerFactory? value) =>
175175
Sentry.currentHub.profilerFactory = value;
176176

177177
@internal
178178
@override
179-
ProfilerFactory? get profilerFactory => Sentry.currentHub.profilerFactory;
179+
SentryProfilerFactory? get profilerFactory =>
180+
Sentry.currentHub.profilerFactory;
180181

181182
@override
182183
Scope get scope => Sentry.currentHub.scope;

dart/lib/src/noop_hub.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ class NoOpHub implements Hub {
123123

124124
@internal
125125
@override
126-
set profilerFactory(ProfilerFactory? value) {}
126+
set profilerFactory(SentryProfilerFactory? value) {}
127127

128128
@internal
129129
@override
130-
ProfilerFactory? get profilerFactory => null;
130+
SentryProfilerFactory? get profilerFactory => null;
131131

132132
@override
133133
Scope get scope => Scope(_options);

dart/lib/src/profiling.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ import 'package:meta/meta.dart';
55
import '../sentry.dart';
66

77
@internal
8-
abstract class ProfilerFactory {
9-
Profiler? startProfiler(SentryTransactionContext context);
8+
abstract class SentryProfilerFactory {
9+
SentryProfiler? startProfiler(SentryTransactionContext context);
1010
}
1111

1212
@internal
13-
abstract class Profiler {
14-
Future<ProfileInfo?> finishFor(SentryTransaction transaction);
13+
abstract class SentryProfiler {
14+
Future<SentryProfileInfo?> finishFor(SentryTransaction transaction);
1515
void dispose();
1616
}
1717

1818
// See https://develop.sentry.dev/sdk/profiles/
1919
@internal
20-
abstract class ProfileInfo {
20+
abstract class SentryProfileInfo {
2121
SentryEnvelopeItem asEnvelopeItem();
2222
}

dart/lib/src/sentry_tracer.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class SentryTracer extends ISentrySpan {
3333
SentryTraceContextHeader? _sentryTraceContextHeader;
3434

3535
// Profiler attached to this tracer.
36-
late final Profiler? profiler;
36+
late final SentryProfiler? profiler;
3737

3838
// Resulting profile, after it has been collected. This is later used by
3939
// SentryClient to attach as an envelope item when sending the transaction.
40-
ProfileInfo? profileInfo;
40+
SentryProfileInfo? profileInfo;
4141

4242
/// If [waitForChildren] is true, this transaction will not finish until all
4343
/// its children are finished.

dart/test/mocks.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ class MockRateLimiter implements RateLimiter {
153153
}
154154

155155
@GenerateMocks([
156-
ProfilerFactory,
157-
Profiler,
158-
ProfileInfo,
156+
SentryProfilerFactory,
157+
SentryProfiler,
158+
SentryProfileInfo,
159159
])
160160
void main() {}

dart/test/mocks.mocks.dart

+16-14
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,41 @@ class _FakeSentryEnvelopeItem_0 extends _i1.SmartFake
3131
);
3232
}
3333

34-
/// A class which mocks [ProfilerFactory].
34+
/// A class which mocks [SentryProfilerFactory].
3535
///
3636
/// See the documentation for Mockito's code generation for more information.
37-
class MockProfilerFactory extends _i1.Mock implements _i3.ProfilerFactory {
38-
MockProfilerFactory() {
37+
class MockSentryProfilerFactory extends _i1.Mock
38+
implements _i3.SentryProfilerFactory {
39+
MockSentryProfilerFactory() {
3940
_i1.throwOnMissingStub(this);
4041
}
4142

4243
@override
43-
_i3.Profiler? startProfiler(_i2.SentryTransactionContext? context) =>
44+
_i3.SentryProfiler? startProfiler(_i2.SentryTransactionContext? context) =>
4445
(super.noSuchMethod(Invocation.method(
4546
#startProfiler,
4647
[context],
47-
)) as _i3.Profiler?);
48+
)) as _i3.SentryProfiler?);
4849
}
4950

50-
/// A class which mocks [Profiler].
51+
/// A class which mocks [SentryProfiler].
5152
///
5253
/// See the documentation for Mockito's code generation for more information.
53-
class MockProfiler extends _i1.Mock implements _i3.Profiler {
54-
MockProfiler() {
54+
class MockSentryProfiler extends _i1.Mock implements _i3.SentryProfiler {
55+
MockSentryProfiler() {
5556
_i1.throwOnMissingStub(this);
5657
}
5758

5859
@override
59-
_i4.Future<_i3.ProfileInfo?> finishFor(_i2.SentryTransaction? transaction) =>
60+
_i4.Future<_i3.SentryProfileInfo?> finishFor(
61+
_i2.SentryTransaction? transaction) =>
6062
(super.noSuchMethod(
6163
Invocation.method(
6264
#finishFor,
6365
[transaction],
6466
),
65-
returnValue: _i4.Future<_i3.ProfileInfo?>.value(),
66-
) as _i4.Future<_i3.ProfileInfo?>);
67+
returnValue: _i4.Future<_i3.SentryProfileInfo?>.value(),
68+
) as _i4.Future<_i3.SentryProfileInfo?>);
6769
@override
6870
void dispose() => super.noSuchMethod(
6971
Invocation.method(
@@ -74,11 +76,11 @@ class MockProfiler extends _i1.Mock implements _i3.Profiler {
7476
);
7577
}
7678

77-
/// A class which mocks [ProfileInfo].
79+
/// A class which mocks [SentryProfileInfo].
7880
///
7981
/// See the documentation for Mockito's code generation for more information.
80-
class MockProfileInfo extends _i1.Mock implements _i3.ProfileInfo {
81-
MockProfileInfo() {
82+
class MockSentryProfileInfo extends _i1.Mock implements _i3.SentryProfileInfo {
83+
MockSentryProfileInfo() {
8284
_i1.throwOnMissingStub(this);
8385
}
8486

flutter/lib/src/profiling.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import '../sentry_flutter.dart';
1111
import 'native/sentry_native.dart';
1212

1313
// ignore: invalid_use_of_internal_member
14-
class NativeProfilerFactory implements ProfilerFactory {
14+
class NativeProfilerFactory implements SentryProfilerFactory {
1515
final SentryNative _native;
1616
final ClockProvider _clock;
1717

@@ -52,7 +52,7 @@ class NativeProfilerFactory implements ProfilerFactory {
5252
}
5353

5454
// ignore: invalid_use_of_internal_member
55-
class NativeProfiler implements Profiler {
55+
class NativeProfiler implements SentryProfiler {
5656
final SentryNative _native;
5757
final int _starTimeNs;
5858
final SentryId _traceId;
@@ -96,7 +96,7 @@ class NativeProfiler implements Profiler {
9696
}
9797

9898
// ignore: invalid_use_of_internal_member
99-
class NativeProfileInfo implements ProfileInfo {
99+
class NativeProfileInfo implements SentryProfileInfo {
100100
final Map<String, dynamic> _payload;
101101
// ignore: invalid_use_of_internal_member
102102
late final List<int> _data = utf8JsonEncoder.convert(_payload);

flutter/test/mocks.mocks.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -219,15 +219,15 @@ class MockSentryTracer extends _i1.Mock implements _i4.SentryTracer {
219219
returnValueForMissingStub: null,
220220
);
221221
@override
222-
set profiler(_i9.Profiler? _profiler) => super.noSuchMethod(
222+
set profiler(_i9.SentryProfiler? _profiler) => super.noSuchMethod(
223223
Invocation.setter(
224224
#profiler,
225225
_profiler,
226226
),
227227
returnValueForMissingStub: null,
228228
);
229229
@override
230-
set profileInfo(_i9.ProfileInfo? _profileInfo) => super.noSuchMethod(
230+
set profileInfo(_i9.SentryProfileInfo? _profileInfo) => super.noSuchMethod(
231231
Invocation.setter(
232232
#profileInfo,
233233
_profileInfo,
@@ -797,7 +797,7 @@ class MockHub extends _i1.Mock implements _i2.Hub {
797797
),
798798
) as _i2.Scope);
799799
@override
800-
set profilerFactory(_i9.ProfilerFactory? value) => super.noSuchMethod(
800+
set profilerFactory(_i9.SentryProfilerFactory? value) => super.noSuchMethod(
801801
Invocation.setter(
802802
#profilerFactory,
803803
value,

0 commit comments

Comments
 (0)