Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Fabric3 monitor framework uses different implementations depending on the host environment. For WebLogic, Maven and Ant, the native host logging framework is used. For example, on WebLogic, monitor proxies will forward events to WebLogic's logging infrastructure. Configuration is therefore specific to each host environment.  The Fabric3 Standalone and Tomcat runtimes use the native Fabric3 monitoring implementation, which is described in the rest of this section.

Info
titleWhy Fabric3 Uses Its Own Monitor Implementation

You may be wondering why the Fabric3 Standalone and Tomcat runtimes use a proprietary monitor implementation as opposed to a third-party logging library. The reason is performance and excessive object creation. Many applications running on Fabric3 have very low latency requirements. This means that a monitoring solution must be capable of routing events extremely quickly (i.e. microsecond latencies to disk) without creating objects. The common third-party logging libraries we examined all suffered from thread contention and, more importantly, excessive object creation which leads to GC pauses under load. As we demonstrate below, the Fabric3 monitor implementation can be configured to use the LMAX Disruptor to alleviate contention and avoid object creation altogether, resulting in stable operation with no GC (even minor collections) under load.  

Configuring the Runtime Destination

The default runtime destination is where Fabric3 runtime events (and application events if not specified) are sent. The default destination can be configured in systemConfig.xml , for example, to record events to a log file instead of outputting to the console. This is done by adding appender entires under the monitor element in systemConfig.xml:

 

Code Block
languagehtml/xml
<monitor>
   <appenders>
       <appender.file file="fabric3.log"/>
       <appender.console/> 
    </appenders>
</monitor>

...

By default, monitor events are sent synchronously. This may result in significant performance impact for  


<f3:monitor name="ApplicationDestination" mode="asynchronous" capacity="3000" proxy="bytecode" timestamp="formatted">
<appenders>
<appender.file file="application.log"/>
<appender.console/>
<!-- uncomment the following line to use the sample monitor extension. The fabric3-samples-monitor-extension jar produced by the monitor-extension
module must be deployed to the runtime as an extension. -->
<!--<appender.component name="SampleFileAppender"/>-->
</appenders>
</f3:monitor>

...