You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ref: Check for missing name in startTransaction
Moving the check to the func where it matters eliminates the need for
the internal field _isTransaction and the downstream logic in startSpan.
* ref: Shorten log message
Shorter message equals smaller bundle size.
Limit ourselves to a single warning line.
The fix to eliminate the warning is to call
startTransaction({name: "some name"})
so the setName advice is misplaced.
* ref: Add hub.startTransaction extension
Extract code that starts transactions from startSpan and deprecate
startSpan.
Move check of empty transaction name to right before sending the
transaction, because it is valid to start the transaction without a name
and set the name later with Transaction.setName().
* misc: Disable tslint deprecation check
* ref: Changes
* ref: Update docs
* fix: Typo
* ref: Small refactor
Co-authored-by: Daniel Griesser <daniel.griesser.86@gmail.com>
Copy file name to clipboardExpand all lines: packages/apm/src/transaction.ts
+7-1
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,8 @@ export class Transaction extends SpanClass {
46
46
privatereadonly_trimEnd?: boolean;
47
47
48
48
/**
49
-
* This constructor should never be called manually. Those instrumenting tracing should use `Stentry.startTransaction()`, and internal methods should use `hub.startSpan()`.
49
+
* This constructor should never be called manually. Those instrumenting tracing should use
50
+
* `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.
50
51
* @internal
51
52
* @hideconstructor
52
53
* @hidden
@@ -92,6 +93,11 @@ export class Transaction extends SpanClass {
92
93
returnundefined;
93
94
}
94
95
96
+
if(!this.name){
97
+
logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');
0 commit comments