BoxLang 🚀 A New JVM Dynamic Language Learn More...

FRAPISDK

v1.0.4 Modules

FRAPISDK

FusionReactor API SDK. A simple CFML library for some common FRAPI functions.

Requirements

  • FusionReactor installed. If it's not installed, this lib won't error, it just won't do anything
  • ColdFusion 10+ or Lucee Server

Installation

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' );

Usage

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

No collaborators yet.
 
  • {{ getFullDate("2021-04-15T16:24:59Z") }}
  • {{ getFullDate("2021-04-15T17:14:27Z") }}
  • 2,806
  • 247