Skip to content

Commit

Permalink
set origin to manual
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Jun 27, 2023
1 parent 2efb2d4 commit 8d41c70
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dart/lib/src/sentry_transaction_context.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:meta/meta.dart';
import 'sentry_trace_origins.dart';

import 'protocol.dart';
import 'sentry_baggage.dart';
Expand Down Expand Up @@ -52,6 +53,7 @@ class SentryTransactionContext extends SentrySpanContext {
: null,
transactionNameSource:
transactionNameSource ?? SentryTransactionNameSource.custom,
origin: SentryTraceOrigins.manual,
);
}

Expand Down
2 changes: 1 addition & 1 deletion dart/test/hub_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void main() {
test('start transaction with context keeps origin', () async {
final hub = fixture.getSut();
final tr = hub.startTransactionWithContext(
SentryTransactionContext('name', 'op', origin: 'auto.navigation.test'),
SentryTransactionContext('name', 'op', origin: 'auto.navigation.test'),
);
expect(tr.origin, 'auto.navigation.test');
});
Expand Down
6 changes: 6 additions & 0 deletions dart/test/sentry_transaction_context_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ void main() {

expect(context.parentSamplingDecision?.sampleRate, 1.0);
});

test('origin set to manual', () {
final context = getSentryTransactionContext();

expect(context.origin, SentryTraceOrigins.manual);
});
}

0 comments on commit 8d41c70

Please sign in to comment.