DX Application Performance Management

Expand all | Collapse all

Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

Jump to Best Answer
  • 1.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 08-27-2013 10:04 PM
    Jack,

    Is it possible to capture a persistent transaction trace by a frontends URL such as /company/web/home,
    where the url is captured in the Fontends/URLs metric section.

    example : SuperDomain|Host|Process|Server|Fontends|Apps|company|URLs|/company/web/home

    Cheers.


  • 2.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 08-28-2013 11:47 AM
    Sort of. You can use a ParameterFilter to trace transactions based on the URL, even if you've not set up URL Grouping. This can be accomplished as below:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--
    ADD THIS TO THE config/ DIRECTORY TO TURN ON TRANSACTION TRACER PERMANENTLY.  NOT DOCUMENTED FORMALLY.  
    NAME SHOULD BE PersistentTransactionTracerConfiguration.xml.  Install to both collectors and MOM.
    Look for a message about persistent transaction trace in the EM log at startup.  Must restart EM to take effect.  
    -->
    
    <PersistentTracerConfiguration xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\cygwin\src\wailea\engineering\products\introscope\source\com\wily\introscope\server\enterprise\entity\transactiontrace\PersistentTransactionTrace0.1.xsd">
        <!-- capture traces for agents matching the given expression-->
        <TraceSession agentExpression=".*" enabled="true">
            <!-- capture traces for the specified URL (operationType of "0" means it much match exactly) -->
            <ParameterFilter parameterName="URL" parameterValue="/company/web/home" operationType="0"/>
        </TraceSession>
    </PersistentTracerConfiguration>
    Be sure to update the agentExpression to match the set of agents that you care about - the more specific you are, the better.


  • 3.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 08-28-2013 08:41 PM
    Hi Jack,

    Thanks for reply, this will come in very usefule! :happy

    I was also wondering if there is a way to use persistant tracing for cross-jvm transaction tracing?

    I have already created some custom correlation tracers in order to transaction trace across jvms, but I was wondering what would be the best way if possible
    to simulate a cross-jvm trace using persistnet tracing.

    I'm assuming that you would need to configure each EM to include persistent tracers for each down stream jvm, but in most cases these times maybe small compared to the
    overall time of the parent jvm. Therefor, making it hard to trace the whole end to end transaction via the "thresholdInMillis" paramater.

    Any ideas?


  • 4.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 08-29-2013 10:33 PM
    Jack,

    Also, I wanted to use a PramaterFilter and a ThresholdFilter, would I need to use the tags <OrFilter> and <AndFilter>?

    Otherwise I was thinking that it should look like the following :

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--
    <TraceSession agentExpression="orkxtcpapp0(.*)\|.*" enabled="true">
    <!-- capture traces for the specified URL (operationType of "0" means it much match exactly) -->
    <ParameterFilter parameterName="URL" parameterValue="/company/web/home" operationType="0"/>
    <!-- capture traces with a duration that exceeds the given threshold -->
    <ThresholdFilter thresholdInMillis="15000"/>
    </TraceSession>

    Thanks.


  • 5.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml
    Best Answer

    Posted 08-30-2013 11:13 AM
    The below would work for tracing by both URL and duration:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--
    ADD THIS TO THE config/ DIRECTORY TO TURN ON TRANSACTION TRACER PERMANENTLY.  NOT DOCUMENTED FORMALLY.  
    NAME SHOULD BE PersistentTransactionTracerConfiguration.xml.  Install to both collectors and MOM.
    Look for a message about persistent transaction trace in the EM log at startup.  Must restart EM to take effect.  
    -->
    <PersistentTracerConfiguration xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\cygwin\src\wailea\engineering\products\introscope\source\com\wily\introscope\server\enterprise\entity\transactiontrace\PersistentTransactionTrace0.1.xsd">
        <!-- capture traces for agents matching the given agentExpression-->
        <TraceSession agentExpression="orkxtcpapp0(.*)\|.*" enabled="true">
    
    
    <AndFilter>
    
    
    
    <!-- capture traces for the specified URL (operationType of "0" means it much match exactly) -->
    
    
    
    <ParameterFilter parameterName="URL" parameterValue="/company/web/home" operationType="0"/>
    
    
    
    <!-- AND capture traces with a duration that exceeds the given threshold in milliseconds -->
    
    
    
    <ThresholdFilter thresholdInMillis="15000"/>
    
    
    </AndFilter>
        </TraceSession>
    </PersistentTracerConfiguration>
    As for your earlier question, the [font=Courier New]introscope.agent.transactiontracer.tailfilterPropagate.enable[font] property might work for that, although I don't know how the tail filter gets applied to a transaction.


  • 6.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 10-09-2013 11:24 PM
    Hi Jack,

    So I have implemented the the Persitent Transaction Tracing in or PPTE environment and it is working well!

    Now my question is about whether there is the ability to throttle the persistent trace?

    For instacne, If a transaction trace is set up for URL A with a threshold of 10 seconds, and a down stream system stalls, it is most likely that the Avg Rsp Times
    will sky rocket. For each transaction that stalls, this could lead to an excesive amount of tracing being triggered, and in turn, lead to application overhead being enforced
    by the agent.

    1. Is there a way to throttle transaction tracing to only allow x amount of transactions to occur in a period or any other way?

    2. If it is decidedd to remove a persistent trace in real time, would it require a restart of the EM or is it a dynamic change that can be made?

    Thanks.


  • 7.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 10-10-2013 10:29 AM
    Hi,

    Transaction traces are already throttled by default by the Agent. You will not receive more than 10 TTs per 15 second interval. That's something you can change in the IntroscopeAgent.profile

    Dynamic or not? Mmmmh, not sure. Easiest way to know is to try it! Disable a short thresholded TT filter, and tell us if you stop receiving those traces! I'm pretty sure there would be a message in the EnterpriseManager.log indicating that it has reloaded the configuration.

    Regs,

    Florian.


  • 8.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 11-28-2013 11:43 PM

    Hi Jack,

    So I have been working on the Persistent Tracing for a while now and have had a few hit and misses allong the way!

    Now I have created the below syntaxt to trigger off either of the following 3 URL based transaction traceres based on the Agent URL, threshold and error filter.  the issue that Im facing is that no transactions seem to be triggered, even when I change the threshold to a small number.  Any ideas?

      

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--

    ADD THIS TO THE config/ DIRECTORY TO TURN ON TRANSACTION TRACER PERMANENTLY. NOT DOCUMENTED FORMALLY.
    NAME SHOULD BE PersistentTransactionTracerConfiguration.xml.
    Look for a message about persistent transaction trace in the EM log at startup. Must restart EM to take effect.
    Andecdotal evidence shows that agents may need to be restarted to be traced automatically as well.
    Install to both collectors and MOM;
    Look for message in log that reads "Started transaction trace for transactions longer than" to show proper invocation
    -->

    <PersistentTracerConfiguration xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ca.com/schemas/apm/introscope/9.1.6.0/PersistentTransactionTrace.xsd">

       <!-- capture traces for Portal (orkxtcpapp01/02/03) matching the given URL expressions -->
       <TraceSession agentExpression="orkxtcpapp0[0-9]\|WebLogic\|wc_customportal[0-9]" enabled="true">
          <!-- capture traces for the specified URL (operationType of "0" means it much match exactly) -->
                    <OrFilter>
                            <AndFilter>
                                    <ParameterFilter parameterName="URL" parameterValue="/web/my-money/overview" operationType="0"/>
                                    <ThresholdFilter thresholdInMillis="15000"/>
                                    <NotFilter>
                                            <ErrorFilter errorString="Stalled Transaction"/>
                                    </NotFilter>
                            </AndFilter>
                            <AndFilter>
                                    <ParameterFilter parameterName="URL" parameterValue="/web/my-money/transfer/funds" operationType="0"/>
                                    <ThresholdFilter thresholdInMillis="12000"/>
                                    <NotFilter>
                                            <ErrorFilter errorString="Stalled Transaction"/>
                                    </NotFilter>
                            </AndFilter>
                            <AndFilter>
                                    <ParameterFilter parameterName="URL" parameterValue="/web/my-money/accounts/details" operationType="0"/>
                                    <ThresholdFilter thresholdInMillis="5000"/>
                                    <NotFilter>
                                            <ErrorFilter errorString="Stalled Transaction"/>
                                    </NotFilter>
                            </AndFilter>
                    </OrFilter>
       </TraceSession>
    </PersistentTracerConfiguration>

     

    Thanks.

     

     



  • 9.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 12-02-2013 02:11 PM

    I don't see any obvious reasons why the TraceSession defintion you are using would not work. I can only suggest that you test by slight modification, iteratively. First, test the agentExpression with just a simple threshold filter with a low threshold. If you don't see any, then you simply need to adjust the expression. If you see traces, then re-use the XML you posted above, but temporarily remove the ParameterFilter elements and see if you capture any traces. If not, re-add, then remove the NotFilter (and ErrorFilter) and repeat. It's not an ideal approach since it involves lots of restarts, but it should help you narrow down which filter is causing the problem.  If the culprit is ParameterFilter, try also using an operationType of 1 (starts with) or 3 (contains) before tweaking the parameterValue (assuming you're confident of those values). 

    - Jack



  • 10.  Re: RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted 02-26-2015 01:22 AM

    Hi Ben,

     

    did you solve that?

     

    I posted the following suggestion in a follow up thread: Have you tried each filter on its own to narrow down on what does not work? E.g.

    1. only <ParameterFilter parameterName="URL" parameterValue="fund-service-v3/Fund_V3" operationType="2"/>
    2. only <ThresholdFilter thresholdInMillis="100"/>
    3. <AndFilter> 1 & 2 </AndFilter>
    4. only <ParameterFilter parameterName="URL" parameterValue="product-holding-pension-service-v1/ProductHoldingPensionService" operationType="2"/>
    5. second and filter
    6. simple or filter (e.g. 1 or 4)
    7. or (3 || 5)

     

    You can also use separate TraceSessions with one AndFilter each instead of the OrFilter.

     

    Ciao,

    Guenter