search cancel

Creating Frontends, Backends and App Map data for non J2EE applications


Article ID: 19015


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE



Non J2EE applications tend not to report Frontend and Backend metrics and may not populate the Application Triage map. This can be corrected with a number of custom directives.


In order to illustrate how to provide Frontend/Backend metrics with AppMap data, a simple test application has been uploaded to this article. It contains three java classes:

  void frontend(MyBackend be)
  void backend()

MyFrontend.frontend calls MyBackend.backend. The thread sleeps for random time intervals before, after and during the call to introduce changing metrics values. Please refer to, and for full details.

The first step is to mark the frontend/backend metrics using the following directives:

#This directives file is provided as a place to try out directives
# without having to modify the out-of-the-box configuration.
SetFlag: CustomFrontendTracing
TurnOn: CustomFrontendTracing
SetFlag: CustomBackendTracing
TurnOn: CustomBackendTracing
IdentifyClassAs: MyFrontend CustomFrontendTracing
IdentifyClassAs: MyBackend CustomBackendTracing
TraceOneMethodIfFlagged: CustomFrontendTracing frontend FrontendMarker "Apps|{classname}|{method}"
TraceOneMethodIfFlagged: CustomBackendTracing backend BackendMarker "Custom Services|{classname}|{method}"

A test application can be deployed with an agent from 9.1 and above. Make sure the following directives are in a file custom.pbd and this is added to the agent profile:


Once it has been confirmed that the frontend/backend metrics are populated the AppMap can be added:

# In order to trace custom nodes in AppMap in addition to standard nodes, we need to create some custom
# tracer mappings. One for determining application name, and another for tracing nodes.
SetTracerClassMapping: AppMapCustomAppNameTracer com.wily.introscope.appmap.agent.trace.AppMapApplicationNameTracer
SetTracerParameter: AppMapCustomAppNameTracer ownerType Application
SetTracerOrdering: AppMapCustomAppNameTracer -5001
SetTracerClassMapping: AppMapCustomAppTracer com.wily.introscope.appmap.agent.trace.AppMapEnablingTracer 
SetTracerParameter: AppMapCustomAppTracer nodeType Servlet
SetTracerParameter: AppMapCustomAppTracer nodeLevel MethodClass
SetTracerParameter: AppMapCustomAppTracer ownerType Application
SetTracerOrdering: AppMapCustomAppTracer -5000
SetTracerClassMapping: AppMapCustomBackendTracer com.wily.introscope.appmap.agent.trace.AppMapEnablingTracer 
SetTracerParameter: AppMapCustomBackendTracer nodeType Database
SetTracerParameter: AppMapCustomBackendTracer nodeLevel MethodClass
SetTracerParameter: AppMapCustomBackendTracer ownerType Application
SetTracerParameter: AppMapCustomBackendTracer boundaryType Backend
SetTracerOrdering: AppMapCustomBackendTracer -5000
# Now we need to add a tracer to generate application name. It needs to be called before other tracers, 
so put it on frontend method.
TraceOneMethodIfFlagged: CustomFrontendTracing frontend AppMapCustomAppNameTracer "MyFrontend"
# Now let's add AppMap nodes. We can use the same tracer flags that we used for blame point metrics.
# First create frontend node:
TraceOneMethodIfFlagged: CustomFrontendTracing frontend AppMapCustomAppTracer "{classname}|{method}" 
# And backend node:
TraceAllMethodsIfFlagged: CustomBackendTracing AppMapCustomBackendTracer "{method}" 

Watch out for line feeds added to these directives, see the custom.pbd uploaded to check syntax. This will add the console application to the AppMap.


Component: APMAGT

Attachments get_app