DX Application Performance Management

Expand all | Collapse all

Help needed for creating a custom pbd

Jump to Best Answer
  • 1.  Help needed for creating a custom pbd

    Posted 04-25-2016 08:00 AM

    Hi All,

     

    I am having the below mentioned classes and respective methods. Please help me to build a custom pbd file. Are these all classes and methods traces can be included in one pbd file?

    Please help me with an example with TraceOneMethodIfFlagged and BlamePointTracer.

     

    Class Name

    **************************************

    Method Name

    *******************

    com.pma.controller.LoginControllerauthenticate()
    com.pma.controller.SynchController                incrementalSynch()
    com.pma.controller.BaseControllergetBeanContext()
    com.pma.service.IncSynchServicegetIncrSynchData()
    syncRequest()
    syncSFDCDetails1()
    syncSFDCDetails()
    submitSFDCApexRequests()
    purgeTransactions()
    com.pma.service.LoginServiceauthenticate()
    getSMAuthenticationId()
    getSAMLToken()
    getAgentDetails()
    com.pma.service.SQLiteServicegetResponseBean()
    com.pma.service.SFDCDataServicegetSFDCDataAsync()
    getSFDCData()
    getSFDCDataUsingApex()
    com.pma.service.impl.SQLiteServiceImplgetResponseBean()
    com.pma.util.PMAConnectionUtilsexecuteHttp()
    getUnzipResponseBody()
    com.pma.util.PMAMappingUtilprepareTransferObjectsForDMLOperation()
    prepareTransferObjectForRead()
    mapApexResponseForSFDCUpdates()
    com.pma.util.SFDC_ConnectiongetSFDCOAuthToken()

     

     

    Look forward for your help.

     

     

    Thanks.

    Rajashekar



  • 2.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 09:24 AM

    Hi Allala:

    While I cannot answer your specific question. There are a variety of references on custom pbds/tracers. I include some here:

    http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/TEC1546418.aspx

    https://communities.ca.com/docs/DOC-12614418

    https://communities.ca.com/message/112912323

    Thanks

    Hal German



  • 3.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 09:52 AM

    Thank you for responses Matt and Hal German.

     

    Is it ok to use multiple classes in a single pbd file with one tracer group like below?

     

    SetFlag: MobilityApp

    IdentifyClassAs: com.pma.controller.LoginController MobilityApp

    TraceAllMethodsIfFlagged: MobilityApp BlamePointTracer "CustomClasses|MobilityApp|Mobility"

    IdentifyClassAs: com.pma.controller.SynchController MobilityApp

    TraceAllMethodsIfFlagged: MobilityApp BlamePointTracer "CustomClasses|MobilityApp|Mobility"

    TurnOn: MobilityApp

     

    OR

     

    SetFlag: MobilityApp

    IdentifyClassAs: com.pma.controller.LoginController MobilityApp

    TraceOneMethodIfFlagged: MobilityApp authenticate BlamePointTracer "CustomClasses|MobilityApp|Mobility"

    IdentifyClassAs: com.pma.controller.SynchController MobilityApp

    TraceOneMethodIfFlagged: MobilityApp incrementalSynch BlamePointTracer "CustomClasses|MobilityApp|Mobility"

    TurnOn: MobilityApp

     

     

    Or do I need to mention each class under separate tracer group? Please clarify me.

     

    Regards,

    Rajashekar



  • 4.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 10:54 AM

    Guenter_Grossberger and hikodavis

     

    Do you wish to weigh in on this?

     

    Thanks

    Hal German



  • 5.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 11:05 AM

    I have not, but can.



  • 6.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 11:10 AM

    One of the custom web services is using these classes and application team want to conduct performance tests.

    What is the best method you suggest for this? I am new to APM and hence unable to decide on what to use and proceed.

     

    Regards,

    Rajashekar



  • 7.  Re: Help needed for creating a custom pbd
    Best Answer

    Posted 04-25-2016 11:13 AM

    APM 10.x agents already has instrumentation for the most common Java WS frameworks so you shouldn't need to write anything. Try the agent out first and then determine if you need something custom.



  • 8.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 11:12 AM

    There is nothing in the agent autoprobe that would keep you from using a single PBD to instrument all of your custom classes and methods.

     

    I would recommend you use one of the "WithParameters" directives to capture any unhandled exception data.

     

    Please check out our wiki on the APM Dev site (http://bit.ly/caapm_dev).

     

    Custom Instrumentation with CA APM



  • 9.  Re: Help needed for creating a custom pbd

    Posted 04-26-2016 10:06 AM

    Hi Davis and Hal German,

     

    I created a PDB file like below. will this work? I placed this file in agent config folder /app/tomcat/CAWily/9.1/wily/core/config and updated IntroscopeAgent.profile with "introscope.autoprobe.directivesFile=tomcat-typical.pbl,hotdeploy,WNAgentServ.pbd".

     

    Please provide your suggestions.

     

    ******************************************************************************

    PBD file name is WNAgentServ.pbd

     

    SetFlag: WNAgentServ

    TurnOn: WNAgentServ

     

     

    IdentifyClassAs: com.pma.controller.LoginController  WNAgentServ

    IdentifyClassAs: com.pma.controller.SynchController  WNAgentServ

    IdentifyClassAs: com.pma.controller.BaseController  WNAgentServ

    IdentifyClassAs: com.pma.service.IncSynchService  WNAgentServ

    IdentifyClassAs: com.pma.service.LoginService  WNAgentServ

    IdentifyClassAs: com.pma.service.SQLiteService  WNAgentServ

    IdentifyClassAs: com.pma.service.SFDCDataService  WNAgentServ

    IdentifyClassAs: com.pma.service.impl.SQLiteServiceImpl  WNAgentServ

    IdentifyClassAs: com.pma.util.PMAConnectionUtils  WNAgentServ

    IdentifyClassAs: com.pma.util.PMAMappingUtil  WNAgentServ

    IdentifyClassAs: com.pma.util.SFDC_Connection  WNAgentServ

     

     

    TraceOneMethodIfFlagged: WNAgentServ incrementalSynch BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ authenticate BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getBeanContext BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getIncrSynchData BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ syncRequest BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ syncSFDCDetails1 BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ syncSFDCDetails BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ submitSFDCApexRequests BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ purgeTransactions BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ authenticate BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getSMAuthenticationId BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getSAMLToken BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getAgentDetails BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getResponseBean BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getSFDCDataAsync BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getSFDCData BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getSFDCDataUsingApex BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getResponseBean BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ executeHttp BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getUnzipResponseBody BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ prepareTransferObjectsForDMLOperation BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ prepareTransferObjectForRead BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ mapApexResponseForSFDCUpdates BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

    TraceOneMethodIfFlagged: WNAgentServ getSFDCOAuthToken BlamePointTracer "CustomClasses|WNAgentServ|Mobility"



  • 10.  Re: Help needed for creating a custom pbd

    Posted 04-26-2016 10:36 AM

    Hi:
    Did you try Hiko's suggestion of 4-25? Support can only provide links on how to create custom pbds. So I have gone as far as I can.

     

    Thanks

    Hal German



  • 11.  Re: Help needed for creating a custom pbd

    Posted 04-26-2016 11:34 AM

    Without being able to see the base or pseudo code, the syntax looks fine.

     

    I will suggest that you also use ExceptionErrorReporter in any PBD that you create.

     

    As you know, we provide a Blame metric called "Errors Per Interval". This shows the number of unhandled exceptions captured. On its own, BlamePointTracer will not increment this value. We provide ExceptionErrorReporter directive provide this functionality.

     

    For each directive, do the following:

     

    <directive>: <tracer group> <method> ExceptionErrorReporter "<metric path>:Errors Per Interval"

     

    So, for your first directive, you have:

     

    TraceOneMethodIfFlagged: WNAgentServ incrementalSynch BlamePointTracer "CustomClasses|WNAgentServ|Mobility"

     

    So the next line should look like this:

     

    TraceOneMethodIfFlagged: WNAgentServ incrementalSynch ExceptionErrorReporter "CustomClasses|WNAgentServ|Mobility|{method}:Errors Per Interval"

     



  • 12.  Re: Help needed for creating a custom pbd

    Posted 04-26-2016 11:41 AM

    Thank you both for help and suggestions.

     

    Regards,

    Rajashekar



  • 13.  Re: Help needed for creating a custom pbd

    Posted 01-15-2019 03:45 PM

    Hello Davis, how are you?

     

    We created the PBD below, we observed that there is capture of the error, but the error is not computed, the metric is ever equal to zero, what can we be doing wrong? We are using the version agent 10.7.0.1.

     

    SetFlag: BrokerTracer

    TurnOn: BrokerTracer

    #### Cadastros de Biometrias ####
    IdentifyClassAs: com.diebold.ws.clientGriaule.ServiceGriauleClientEnroll BrokerTracer


    #### Consulta o status do cadastramento ####
    IdentifyClassAs: com.diebold.ws.clientGriaule.ServiceGriauleClientEnrollStatus BrokerTracer


    #### PENUMPER ####
    IdentifyClassAs: com.diebold.ws.clientGriaule.ServiceGriauleClientQuery BrokerTracer

    #### Autenticação rede própria ####
    IdentifyClassAs: com.diebold.ws.clientGriaule.ServiceGriauleClientVerify BrokerTracer


    #### Autenticações Rede TecBan ####
    IdentifyClassAs: com.diebold.ws.clientGriaule.ServiceGriauleClientGetTemplates BrokerTracer


    TraceAllMethodsIfFlagged: BrokerTracer BlamePointTracer "Biometria|Broker|{classname}|{method}"
    TraceAllMethodsIfFlagged: BrokerTracer ExceptionErrorReporter "Biometria|Broker|{classname}|{method}:Errors Per Interval"

     

    Thank you so much.



  • 14.  Re: Help needed for creating a custom pbd

    Posted 01-16-2019 07:30 AM

    Hello Carlos,

    As Hiko mentions in one of the updates above, you should be using WithParameters directives for the exception tracing. I don't see a TraceAllMethodsWithParametersIfFlagged so you would have to look at the "with parameters" options, for examples:

     

    TraceOneMethodWithParametersIfFlagged

    ProbeBuilder Directives Reference - CA Application Performance Management - 10.7 - CA Technologies Documentation 

     

    TraceComplexMethodsWithParametersIfFlagged

    ProbeBuilder Directives Reference - CA Application Performance Management - 10.7 - CA Technologies Documentation 

     

    There is a description of how ExceptionErrorReporter should be configured in the documentation too (search for ExceptionErrorReporter on this page)

    Configure ErrorDetector - CA Application Performance Management - 10.7 - CA Technologies Documentation 

     

    Thanks,

    David



  • 15.  Re: Help needed for creating a custom pbd

    Posted 01-16-2019 08:02 AM

    Perfect Davis,

     

    But in case I don't know the method, isn't there a way to implement the tracer of all the methods?

     

    Thank you so much



  • 16.  Re: Help needed for creating a custom pbd

    Posted 01-16-2019 08:09 AM

    This tracer can be a solution, TraceComplexMethodsWithParametersIfFlagged.

     

    But I have a doubt, should I use the exceptionerrorreporter along with Blamepointracer to be able to capture and count errors?

     

    Thanks



  • 17.  Re: Help needed for creating a custom pbd

    Posted 01-16-2019 12:03 PM

    You use both in combination.

     

    BPT will get you data concerning your 5 Blame metrics but EPI will always report zero. This is by design as you can see from the documentation.

    ExceptionErrorReporter will cause EPI to display actual exception counts for your BPT directive.

     

    Just make sure to use a "WithParameters" directive for both lines.



  • 18.  Re: Help needed for creating a custom pbd

    Posted 04-25-2016 09:24 AM

    Hi,

     

    Our documentation has the content to help you with this.  Please see the link below.

     

    Advanced Instrumentation - CA Application Performance Management - 10.2 - CA Technologies Documentation

     

    Regards,

    Matt