File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
packages/apm/src/integrations Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments