DX Application Performance Management

 View Only
  • 1.  RE: Auto Tracing using PersistentTransactionTracerConfiguration.xml

    Posted Feb 07, 2013 02:01 PM
    Hi,

    Where can I find this PersistentTransactionTracerConfiguration.xml? I looked into /EM_HOME/config and didn't this xml file. I'm on v9140 and have a need trace all transactions above 15 seconds.

    Any help will be appreciated.


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

    Posted Feb 07, 2013 03:04 PM
    The file is not, to my knowledge, distributed anywhere with the software. However, it can be created from scratch. Here is an example one:
    <?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="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 with a duration that exceeds the given threshold -->
    
    
    <ThresholdFilter thresholdInMillis="5000"/>
    
    </TraceSession>
    </PersistentTracerConfiguration>
    As noted, it should be saved to [font=Courier New]<EM_HOME>/config/PersistentTransactionTracerConfiguration.xml[font]. Multiple conditions can be specified, as noted earlier in this thread. For additional reference, here is the relevant schema for this XML file:
    <xs:schema xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" jaxb:version="1.0">
    
    <xs:annotation>
    
    
    <xs:appinfo>
    
    
    
    <jaxb:globalBindings generateIsSetMethod="true"/>
    
    
    </xs:appinfo>
    
    </xs:annotation>
    
    <xs:element name="ErrorFilter">
    
    
    <xs:annotation>
    
    
    
    <xs:documentation>Trace matching on errors</xs:documentation>
    
    
    </xs:annotation>
    
    
    <xs:complexType>
    
    
    
    <xs:attribute name="errorString" type="xs:string" use="required"/>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:element name="ParameterFilter">
    
    
    <xs:complexType>
    
    
    
    <xs:attribute name="parameterName" type="xs:string" use="required"/>
    
    
    
    <xs:attribute name="parameterValue" type="xs:string" use="optional"/>
    
    
    
    <xs:attribute name="operationType" type="xs:int" use="required">
    
    
    
    
    <xs:annotation>
    
    
    
    
    
    <xs:documentation>Operation type of the filter.  0 = exact match; 1 = starts with; 2 = ends with; 3 = contains; 4 = exists</xs:documentation>
    
    
    
    
    </xs:annotation>
    
    
    
    </xs:attribute>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:element name="ThresholdFilter">
    
    
    <xs:annotation>
    
    
    
    <xs:documentation>Capture traces with durations that exceed the given threshold</xs:documentation>
    
    
    </xs:annotation>
    
    
    <xs:complexType>
    
    
    
    <xs:attribute name="thresholdInMillis" type="xs:int" use="required"/>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:complexType name="TracerList">
    
    
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    
    
    
    <xs:element ref="AndFilter"/>
    
    
    
    <xs:element ref="OrFilter"/>
    
    
    
    <xs:element ref="ParameterFilter"/>
    
    
    
    <xs:element ref="ErrorFilter"/>
    
    
    
    <xs:element ref="ThresholdFilter"/>
    
    
    
    <xs:element ref="NotFilter"/>
    
    
    </xs:choice>
    
    </xs:complexType>
    
    <xs:element name="TraceSession">
    
    
    <xs:complexType>
    
    
    
    <xs:choice>
    
    
    
    
    <xs:element ref="NotFilter"/>
    
    
    
    
    <xs:element ref="AndFilter"/>
    
    
    
    
    
    
    
    
    <xs:element ref="OrFilter"/>
    
    
    
    
    <xs:element ref="ParameterFilter"/>
    
    
    
    
    <xs:element ref="ErrorFilter"/>
    
    
    
    
    <xs:element ref="ThresholdFilter"/>
    
    
    
    </xs:choice>
    
    
    
    <xs:attribute name="agentExpression" type="xs:string" use="required"/>
    
    
    
    <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:element name="NotFilter">
    
    
    <xs:complexType>
    
    
    
    <xs:choice>
    
    
    
    
    <xs:element ref="AndFilter"/>
    
    
    
    
    <xs:element ref="OrFilter"/>
    
    
    
    
    <xs:element ref="ParameterFilter"/>
    
    
    
    
    <xs:element ref="ErrorFilter"/>
    
    
    
    
    <xs:element ref="ThresholdFilter"/>
    
    
    
    </xs:choice>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:element name="PersistentTracerConfiguration">
    
    
    <xs:complexType>
    
    
    
    <xs:sequence>
    
    
    
    
    <xs:element ref="TraceSession" minOccurs="0" maxOccurs="unbounded"/>
    
    
    
    </xs:sequence>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:element name="AndFilter">
    
    
    <xs:annotation>
    
    
    
    <xs:documentation>Capture trace if all of the trace filters within this AndFilter pass</xs:documentation>
    
    
    </xs:annotation>
    
    
    <xs:complexType>
    
    
    
    <xs:complexContent>
    
    
    
    
    <xs:extension base="TracerList"/>
    
    
    
    </xs:complexContent>
    
    
    </xs:complexType>
    
    </xs:element>
    
    <xs:element name="OrFilter">
    
    
    <xs:annotation>
    
    
    
    <xs:documentation>Capture trace if any one of the trace filters within this OrFilter pass</xs:documentation>
    
    
    </xs:annotation>
    
    
    <xs:complexType>
    
    
    
    <xs:complexContent>
    
    
    
    
    <xs:extension base="TracerList"/>
    
    
    
    </xs:complexContent>
    
    
    </xs:complexType>
    
    </xs:element>
    </xs:schema>


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

    Posted Feb 07, 2013 03:32 PM
    Thank you, jakbutler.


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

    Posted Feb 21, 2013 02:55 PM
    @jakbulter, I wanted to PM you but the Community doesn't have the PM feature.

    I'm not a devloper, so I'm not sure what to do with the xml schema you posted. With that said, do I just copy and paste the following and save it to EM_HOME/config/PersistentTransactionTracerConfiguration.xml and recycle the EM?
     <?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="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 with a duration that exceeds the given threshold -->
             <ThresholdFilter thresholdInMillis="5000"/>
         </TraceSession>
     </PersistentTracerConfiguration>


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

    Posted Feb 21, 2013 03:10 PM
    @VLu,

    Assuming you like the criteria being used for the persistent transaction trace, yup, that's basically it! Luckily, no development knowledge is required; here are the exact steps that I recommend following (step 3 is the only one your question didn't seem to include, and I'd say that it's the most important):
    [list=1]
    [*]Create an empty file: [font=Courier New]<EM_HOME>/config/PersistentTransactionTracerConfiguration.xml[font]
    [*]Paste the sample XML from my post into the file.
    [*]Review the [font=Courier New]TraceSession[font] and [font=Courier New]TransactionFilter[font] tags. Right now, this file will turn on transaction tracing for every agent with transactions lasting more than 5,000 milliseconds (5 seconds). In your case, you might want to select specific agents or use different transaction filtering criteria. The goal is to not add too much overhead to the Agents and to not overload the traces database. The XML schema I provided earlier shows what other kind of filter options are available (you can combine multiple filters and use basic Boolean AND/OR logic), but if you aren't sure, just post the logic you want to use in plain English and I'll see if I can convert it to working XML for this file.
    [*]Save the file.
    [*]Restart the Enterprise Manager.
    [list] Even if you do like the current criteria being used, I still recommend reviewing the filtering logic and XML tags being used so that get familiar with the syntax and any future updates to this file will be easier.

    As for the XML schema, it may look scary, but it does contain useful information. For instance, you can specify transaction trace sessions for only transactions that encounter a specific error, contain a particular HTTP Request parameter, or exclude certain agents from an otherwise all-inclusive agent selection. In short, what the schema says is that something like the below should work just fine for the [font=Courier New]PersistentTransactionTracerConfiguration.xml[font] file contents:
    <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 all agents -->
    
    <TraceSession agentExpression=".*" enabled="true">
    
    
    <OrFilter>
    
    
    
    <AndFilter>
    
    
    
    
    <!-- capture traces with a duration that exceeds 5 seconds AND encouter the 404 error-->
    
    
    
    
    <ThresholdFilter thresholdInMillis="5000"/>
    
    
    
    
    <ErrorFilter errorString="HTTP Error Code: 404: /resources/favicon.ico"/>
    
    
    
    
    <!-- but don't do this trace if the tranaction has an HTTP Request Paramter exactly matching X-Forwarded-Proto with the value https -->
    
    
    
    
    <NotFilter>
    
    
    
    
    
    <ParameterFilter parameterName="X-Forwarded-Proto" parameterValue="https" operationType="0">
    
    
    
    
    </NotFilter>
    
    
    
    </AndFilter>
    
    
    
    <AndFilter>
    
    
    
    
    <!-- capture traces for any transaction with a duration that exceeds 15 seconds and has not been flagged as a Stalled Transaction-->
    
    
    
    
    <ThresholdFilter thresholdInMillis="15000"/>
    
    
    
    
    <NotFilter>
    
    
    
    
    
    <ErrorFilter errorString="Stalled Transaction"/>
    
    
    
    
    </NotFilter>
    
    
    
    </AndFilter>
    
    
    </OrFilter>
    
    </TraceSession>
    
    <!-- capture traces for over 10 seconds for Agent A -->
    
    <TraceSession agentExpression=".*Agent A" enabled="true">
    
    
    <ThresholdFilter thresholdInMillis="10000"/>
    
    </TraceSession>
    </PersistentTracerConfiguration>


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

    Posted Feb 22, 2013 10:39 AM
    Thank you, jakbulter. I will try it out next week. I might have come back with more questions, if you don't mind.


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

    Posted Feb 22, 2013 11:14 AM
    Of course I don't mind. :grin: The great thing about a community forum is: your questions benefit everybody. So, don't be shy.

    - Jack


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

    Posted Mar 31, 2020 02:18 AM
    Hi
    Where can I find this PersistentTransactionTracerConfiguration.xml?
    Thank you



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

    Broadcom Employee
    Posted Apr 22, 2020 12:15 PM
    If you are using APM version < 10.5, you can follow the directions posted by jakbutler above. He has posted the XML in his message.

    ------------------------------
    Custom Solution Architect
    Broadcom
    ------------------------------