APIM manage workflow with multiple roles APIM 3.0.0 per API based subscription workflow Logging internal HTTP requests Log APIM analytics events to a file Monetization and sample with WSO2 API Manager 2.6.0 Share application and subscription among a set of specific groups or roles WSO2 APIM Correlating analytics event with correlationID APIM analytics distinguish production and sandbox traffic APIM 2.x.x analytics internal and analytics tuneup Configure APIM(Next release) Key Manager User stores APIM(Next release) working with key manager DAS 3.x Parse system variables to Spark Context Revoke OAuth application In APIM 2.1.0 Next WSO2 APIM powered by WSO2 Ballerina Configure WSO2 APIM Analytics on Cluster environment Configure WSO2 DAS 3.1.0 for WSO2 APIM 2.0.0 Analytics WSO2 APIM publishing custom statistics WSO2 APIM Error codes Working with WSO2 message tracer Use DAS admin service to query using Spark SQL Configure WSO2 APIM Analytics using XML WSO2 APIM Generating and Retrieving Custom Statistics Understanding WSO2 APIM Statistics Model Publishing WSO2 APIM 1.10.x Runtime Statistics to DAS with RDBMS Publishing_APIM_1100_Runtime_Statistics_to_DAS Aggregate functions with WSO2 DAS REST API Create a cApp for WSO2 DAS Debugging WSO2 Products using OSGI console. Publishing APIM Runtime Statistics to DAS Deploy cApp on WSO2 DAS How to configure and start the Accumulo minicluster How to setup DNS server on Ubuntu and Ubuntu server How to use Java Reflection how to install apache web server on ubuntu and ubuntu server How to install Mail server on Ubuntu and Ubuntu server How to install squirrelmail webmail client on Ubuntu and Ubuntu Server Pass and return String value to JNI method Pass and return numeric value to JNI method Calling a C Function from the Java Programming Language using JNI AXIS 2 Sample web service Client with maven and eclipse How to setup AXIS 2 with Apache Tomcat AXIS 2 Sample web service with maven and eclipse Robot framework Sample with Selenium Robot framework Custom Library Sample Behaviour-Driven Development with JBehave and Eclipse Play Audio with Netbeans and linking with LibVLC Implement LibVLC based player with QT-part2 Simple Audio playing sample with LibVLC How to install LibVLC on Ubuntu Implement LibVLC based player with QT-part1
Working with WSO2 message tracer
  1. Introduction

    In this document, it will explain how to use wso2 message tracer feature on the carbon-based product. Here we used message tracer feature 1.0.x versions as an example. Also, the document will explain how to install and configure message tracer on your wso2 product.

  2. What is message tracing

    Message tracing is an identification of each message flow in each transaction which is going through message gateway.

  3. Why message tracing

    Message tracing is used to debug, audit, logging and debug messages content and it’s the direction. This is very useful when you want to track all message and its flow of the same transaction.

  4. Install message tracer feature

    Message tracer feature is part of the carbon-analytics and you can find the message tracer source code from here.

    Message tracer can be installed into your wso2 product as a feature from feature repo.

    You can use available feature repose based on the carbon-kernel platform.

    For 4.2.x kernel: http://product-dist.wso2.com/p2/carbon/releases/turing/

    For 4.4.x kernel: http://product-dist.wso2.com/p2/carbon/releases/wilkes/

    Also, you can build the feature repose by yourself on your local setup and point feature repo location as the file path. Here the git location for the source https://github.com/wso2/carbon-feature-repository

    Next, try to install feature on the product. Here i used the wso2 apim 2.0.0

      • Start the APIM 2.0.0
      • Go to the features section in the “Main” -> “Configure” menu
      • Click add the repository and set the path to the p2-repo and set name for the repo
      • Then click “Add” to add the repository
      • Next, select the p2-repo to search message tracer feature under the tab “Available Features”
      • Enter “Message” for “Filter by feature name” field and click “find features” button
      • Then You can see the available message tracer feature
    • Check version you wish to install and click install
    • Continue with the installation process and restart APIM changes to take effect
  5. Configure message tracer

    After feature installation done, go to “Configure” -> “Message Tracing” section from the left menu

    Check “Enable Message Tracing” option to enable message tracing and click update

    Select following option as you desire to configure message tracer

    • Dump Message Content
      • Check this option to enable message tracing for the content of the message as well
    • Enable Logging
      • Check the option to enable logging into the available logging handler to log the tracing message
    • Enable BAM Event Publishing
      • Check this option to publish tracing event to WSO2 DAS
  6. Publishing events to DAS

    Check “Enable BAM Event Publishing” option to enable DAS data publishing

    In order to publish the event to DAS you should configure following configuration on APIM and DAS.

    Event stream definition should be configured in DAS in order to receive an event.

    • Once you save the changes, in APIM will generate stream definition in <APIIM_HOM>/repository/deployment/server/eventstreams/BAM_MESSAGE_TRACE_1.0.0.json
    • Or you can use the following stream definition
    • To deploy the same definition you can copy above json to <DAS_HOME>/repository/deployment/server/eventstreams/BAM_MESSAGE_TRACE_1.0.0.json

    Also, event stream should be persistent in order to save event on Tables.

      • Once you deploy stream definition and restarted, you can find the stream you deployed under “streams” section of “Main” -> “Event” menu
      • To persist event stream edit the stream definition.
      • Then select “Next [Persist Event]” button at the bottom in the edit page
      • Then check “Persist Event Stream” and check all the attributes after it.
      • Then click “save event stream button” to persist event
      • And finally, you should configure the event receiver to point stream to persistent tables
      • For that go to “Main” -> “Event” -> “receivers” to add a receiver like below

    Next APIM should configure for a publisher in order to publish an event to DAS

      • Go APIM, “publishers” section of “Main” -> “Event” menu
      • Click “add” event publisher
      • Set name for the data publisher
      • Select BAM_MESSAGE_TRACER:1.0.0 stream from event source
      • Select “wso2event” from “Output Event Adapter Type”
      • Then set the DAS event receiver configuration as below
  7. Results
      • After the logging enabled, you can see the log message from APIM console as below
    [2016-06-11 09:48:01,901]  INFO - HandlerUtils Massage Info: Transaction id=1401719621988766713213  Message direction=IN  Server name=172.16.2.136:9763  Timestamp=1465618681901  Service name=__SynapseService  Operation Name=mediate
    [2016-06-11 09:48:01,903] INFO - HandlerUtils Massage Info: Transaction id=1401719621988766713213 Message direction=OUT Server name=172.16.2.136:9763 Timestamp=1465618681903 Service name=__SynapseService Operation Name=mediate
    [2016-06-11 09:48:01,909] INFO - HandlerUtils Massage Info: Transaction id=140172037238671183803 Message direction=IN Server name=172.16.2.136:9763 Timestamp=1465618681909 Service name=__SynapseService Operation Name=mediate
    [2016-06-11 09:48:01,917] INFO - HandlerUtils Massage Info: Transaction id=140172037238671183803 Message direction=OUT Server name=172.16.2.136:9763 Timestamp=1465618681917 Service name=__SynapseService Operation Name=mediate
      • when you configured DAS data publishing you can find the event data from DAS data-exporer like below

Add Comment

* Required information
1000
Powered by Commentics

Comments (0)

No comments yet. Be the first!