Posts

Showing posts with the label Mule

Enabling Microsoft Application Insights for Mule ESB monitoring

Image
Microsoft Azure Application Insights requires Mule 3.7 or later. Application Insights depends on org.apache httpclient and httpcore versions that are first bundled with Mule 3.7 Application Insights is an Azure based application performance dashboard that can monitor applications deployed inside, or outside, Azure.  Application Insights SDKs are available for a variety of languages with a heavy focus on standard library web driven applications or services. This blog entry describes how easy it is to enable Application Insights for a Mule ESB application that does not use any of the out-of-the-box supported web hooks. In this case, we monitoring the out-of-the-box JMX beans provided by Mule. Performance information is gathered by Application Insights where it is displayed in the Azure Portal. Mule exposes performance data about applications and flows via JMX.  Any of this can be forwarded to the Application Insights Dashboard. Steps Create an Application Insights...

Using files with embedded Mule Expression Language for better looking HTML

Image
Our team returns a HTML home page  when anyone makes a GET request at the root of our API or monitoring web endpoints.  This  service help page includes a combination of static and dynamic content. We struggled building decent looking pages until we started using the Mule Parse Template  component and groovy component that invokes the Mule Expression Language (MEL) processor against the markup. The example to the right shows how our  default  behavior in a our web choice router processes a web template. Sample Code You can find sample code in the Coda Hale exception metrics counter demo on GitHub Parse Template The Parse Template  component loads a file into the Mule payload. You can use this to return any raw file to the caller based on the request path. This lets you return html, css or js type files from iniside your application.  We will use this feature to load an HTML file into the payload that includes embedded MEL.  The...

Capture and expose system exception statistics in Mule using Coda Hale Metrics

Image
This article describes how to use the Coda Hale metrics library to capture the counts and types of system exceptions thrown outside of Mule ESB flow processing.  Historical exception information is exposed via JMX or written to disk using CodaHale reporters as described on the CodaHale metrics web site . You can use this same technique in any Java application.  We inject instrumentation at the system context level.  That component converts the wrapped exception stack to a counter name that is then created and incremented in the Coda Hale registry.  I use the simple running counter because I don't find the native Coda Hale histogram data useful for this type of metric. You can use other metric types if you want more complex statistics. Components We use 2 injection components 2 codahale components and a custom listener  to make this work: MetricsRegistry:  A CodaHale singleton that maintains a reference to all statistics. It is injecte...

Capture and expose flow exception statistics in Mule using Coda Hale metrics

Image
This article describes how to use the Coda Hale metrics library to capture the counts and types of exceptions thrown as part of Mule ESB flow processing.  Historical exception information is exposed via JMX or written to disk using CodaHale reporters as described on the CodaHale metrics web site . You can use this same technique in any Java application.  We add an instrumentation component to each mule Exception Flow.  That component converts the wrapped exception stack to a counter name that is then created and incremented in the Coda Hale registry.  I use the simple running counter because I don't find the native Coda Hale histogram data useful for this type of metric. You can use other metric types if you want more complex statistics. Components We use 1 injection component, 2 codahale components and a custom flow component to make this work: MetricsRegistry:  A CodaHale singleton that maintains a reference to all statistics. It is inject...

Choose the right workspace type when using Team Foundation Server and Eclipse

Image
Microsoft has a nice TFS Eclipse plugin that acts like any other Eclipse team provider.  It provides full TFS Source Control and Team view support inside of Eclipse. You can find information about the plugin on the the Microsoft MSDN site . Team Foundation Server supports TFS version control (TFS) projects and GIT version control (TFS) projects.  TFS uses the concept of a workspace to track changes.  A TFS Project Workspace can be managed as either a "Server Workspace" or "Local Workspace".  There are several good articles that describe how this works phkelly's blog  and MSDN documentation . Server Workspace : These were the default for all workspaces created prior to TFS 2012. Server Workspace follows an older convention where all files on the local machine are marked as "Read Only" until checked out for modification.  This means you cannot edit files outside of TFS or Eclipse unless they have already been checked out for modification. Server w...