When looking at a Java application’s performance, it is sometime useful to be able to group the processing time of your custom libraries or “components” (or even 3rd party libraries) so that you may see their processing time.
The Foglight Java instrumentation configuration or “tuning” allow the Foglight Administrator to control many aspects of its behaviour. The one in particular which will help us here is the ability to define “Custom Components” so that they are aggregated in the trace information and in the higher-level views such as the Sampled Breakdown graphs:
The drill-downs provide more detailed information as can be seen from the single trace detail below:
The place where all this happens is the Agent Properties dashboard. This is where the Foglight Administrator can modify the agent’s instrumentation (after having first made a backup, of course). In the figure below, one can see the modification which was required to create the “HeavyDuty Mathlib” custom component.
The format of the entry is:
"<Component Name Label>": MethodList (
include "<method name>”,
include /<method name regular expression>/,
<Component Name Label> is the label that you want displayed in graphs and tables. In the example above, the label is HeavyDuty MathLib
<method name> is the name of a method to include in the component
< method name regular expression> is a regular expression to match names of functions to include in the component. Note that there are no quotes around the regular expression.
You can include one or many functions by separating them with commas using either the <method name> or the < method name regular expression> approach (i.e. you don't have to use both). You can also exclude methods by using the key-word exclude instead of include.