Contact Us 1-800-596-4880

Configure Default Events Tracking

This version of Mule reached its End of Life on May 2, 2023, when Extended Support ended.

Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted.

MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements.

Because event tracking requires processing and network overhead to aggregate and store the events that Mule runtime engine generates, it is disabled by default. However, you can enable and configure default events tracking for connectors or message processors that support it, at one of two levels:

  • At the flow level

  • At the message processor (connector or component) level, which takes precedence over the flow level setting

After you enable event tracking, customize the transaction ID to identify specific tracked events so that you can analyze them at runtime.

Flow-Level Event Tracking

Use this option to enable default event tracking for all elements in a flow that support event tracking. You can disable tracking for specific processors or connectors to override the flow level setting.

Steps to enable default events tracking for all components in a flow:

  1. Select your flow component to open the properties view.

  2. Enable default business events using either the UI or XML:

    • In the UI, select Enable default events tracking:

      default-event-tracking-flow
    • In the XML, add attribute tracking:enable-default-events="true" to the flow element:

      <flow name="testFlow" tracking:enable-default-events="true">
  3. Save your settings.

Message Processor-Level Event Tracking

You can enable event tracking on individual connectors and components that support event tracking.

Steps to enable enable default events tracking for an individual component:

  1. Open the connector or component properties view.

  2. Enable default business events using any of the following options:

    • In the UI, select Enable default events tracking:

      default-event-tracking-component
    • In the XML, add attribute tracking:enable-default-events="true" inside your component element:

      <flow name="flow">
        ...
          <choice doc:name="Choice" tracking:enable-default-events="true"/>
        ...
      </flow>
  3. Save your settings.

Customize the Transaction ID

Define a transaction ID so that meaningful information, such as an order number, is displayed for a transaction when you analyze tracked events at runtime. If you do not customize the transaction ID, Mule assigns a numeric transaction ID by default.

The transaction ID supports DataWeave expressions, which enables you to create an ID dynamically and include information related to event into the ID. Follow these steps to set a transaction ID either in the UI or in XML:

  • In the UI:

    1. Drag the Set Transaction Id component to your flow.

    2. Define a transaction ID:

      custom-transaction-id

  • In the XML, add a child element to the flow element:

    <flow name="flow">
    ...
      <tracking:transaction id="#[payload.orderId]" />
    ...
    </flow>

See Also