private void addTrace ( String statement , final boolean isSuccess , final long duration ) { TracedCall aRunningTrace = RunningTraceContainer . getCurrentlyTracedCall ( ) ; CurrentlyTracedCall currentTrace = aRunningTrace . callTraced ( ) ? ( CurrentlyTracedCall ) aRunningTrace : null ; if ( currentTrace != null ) { TraceStep currentStep = currentTrace . startStep ( ( isSuccess ? EMPTY : SQL_QUERY_FAILED ) + "SQL : (' " + statement + "')" , producer , statement ) ; if ( ! isSuccess ) currentStep . setAborted ( ) ; currentStep . setDuration ( duration ) ; currentTrace . endStep ( ) ; } }
Perform additional profiling - for Journey stuff .