BoxLang 🚀 A New JVM Dynamic Language Learn More...
FusionReactor API SDK. A simple CFML library for some common FRAPI functions.
install frapisdk
And then access it like this
getInstance( 'FRTransService@frapisdk' ).setCurrentTransactionName( 'My custom name' );
This should work find in a non-ColdBox app. Just manually create the CFC. It is receommented to use this as a singleton.
application.FRTransService = new modules.frapisdk.models.FRTransService();
application.FRTransService.setCurrentTransactionName( 'My custom name' );
Override the name of the current transaction
FRTransService.setCurrentTransactionName( 'My custom name' );
Override the name of the current transaction's application name
FRTransService.setCurrentTransactionApplicationName( 'My custom app name' );
Track a custom transaction (will be autlmatically associated with the web request master transaction)
var tran = FRTransService.startTransaction( 'name', 'description' );
try {
// Do stuff here
} catch( any e ) {
FRTransService.errorTransaction( tran, e );
rethrow;
} finally {
// you MUST call this or the transaction will never show as being finished in FR's interfacet
FRTransService.endTransaction( tran )
}
$
box install FRAPISDK