File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Enhancements
6
+
7
+ - Log warning if both tracesSampleRate and tracesSampler are set ([ #1701 ] ( https://github.com/getsentry/sentry-dart/pull/1701 ) )
8
+
5
9
### Features
6
10
7
11
- Initial (alpha) support for profiling on iOS and macOS ([ #1611 ] ( https://github.com/getsentry/sentry-dart/pull/1611 ) )
Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ class SentryTracesSampler {
14
14
SentryTracesSampler (
15
15
this ._options, {
16
16
Random ? random,
17
- }) : _random = random ?? Random ();
17
+ }) : _random = random ?? Random () {
18
+ if (_options.tracesSampler != null && _options.tracesSampleRate != null ) {
19
+ _options.logger (SentryLevel .warning,
20
+ 'Both tracesSampler and traceSampleRate are set. tracesSampler will take precedence and fallback to traceSampleRate if it returns null.' );
21
+ }
22
+ }
18
23
19
24
SentryTracesSamplingDecision sample (SentrySamplingContext samplingContext) {
20
25
final samplingDecision =
You can’t perform that action at this time.
0 commit comments