Skip to content

Commit f088aad

Browse files
committed
fix: Transaction interface
1 parent 78ecad8 commit f088aad

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

packages/apm/src/transaction.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ export class Transaction extends SpanClass {
8181

8282
/**
8383
* Sets the finish timestamp on the current span.
84+
*
85+
* @inheritdoc
86+
*
8487
* @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming
8588
* the duration of the transaction. This is useful to discard extra time in the transaction that is not
8689
* accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the

packages/types/src/transaction.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,16 @@ export interface Transaction extends TransactionContext, Span {
1515
* Set the name of the transaction
1616
*/
1717
setName(name: string): void;
18+
19+
/**
20+
* Sets the finish timestamp on the current span.
21+
*
22+
* @inheritdoc
23+
*
24+
* @param trimEnd If true, sets the end timestamp of the transaction to the highest timestamp of child spans, trimming
25+
* the duration of the transaction. This is useful to discard extra time in the transaction that is not
26+
* accounted for in child spans, like what happens in the idle transaction Tracing integration, where we finish the
27+
* transaction after a given "idle time" and we don't want this "idle time" to be part of the transaction.
28+
*/
29+
finish(endTimestamp?: number, trimEnd?: boolean): string | undefined;
1830
}

0 commit comments

Comments
 (0)