Skip to content

Commit 5e90412

Browse files
committed
ref: Remove transaction status
1 parent 1669c84 commit 5e90412

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

packages/apm/src/integrations/tracing.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -203,21 +203,14 @@ export class Tracing implements Integration {
203203
}
204204

205205
if (Tracing._isEnabled()) {
206-
if (
207-
Tracing.options.maxTransactionDuration !== 0 &&
208-
event.type === 'transaction' &&
206+
const isOutdatedTransaction =
209207
event.timestamp &&
210208
event.start_timestamp &&
211209
(event.timestamp - event.start_timestamp > Tracing.options.maxTransactionDuration ||
212-
event.timestamp - event.start_timestamp < 0)
213-
) {
214-
return null;
215-
}
210+
event.timestamp - event.start_timestamp < 0);
216211

217-
// TODO: Once we have session this should change
218-
// If an event is level fatal we consider the transaction failed
219-
if (event.type !== 'transaction' && event.level === 'fatal') {
220-
Tracing.setTransactionStatus(SpanStatus.InternalError);
212+
if (Tracing.options.maxTransactionDuration !== 0 && event.type === 'transaction' && isOutdatedTransaction) {
213+
return null;
221214
}
222215
}
223216

0 commit comments

Comments
 (0)