Contact Us 1-800-596-4880

Collecting Mule Gateway Metrics

Mule Gateway is enabled, by default, to collect relevant usage data for improving user experience. MuleSoft uses this data to analyze and better understand the Mule Gateway capabilities uniformly for all customers. The metrics collected by Mule Gateway include:

  • Number and types of applications, APIs, and policies deployed

  • Mule Gateway-related configuration parameters

  • Statistics about the number of requests processed

Note that sensitive information, such as credentials and policy configuration parameters, is not collected. This feature is included in the 3.9.5, 4.2.2, and 4.3.0 versions of Mule runtime engine.

Disable Mule Gateway Metrics Collection

Even though no sensitive information is collected using this configuration, you might still want to disable it for some reason. To disable the configuration, add the following entry in the wrapper.conf file:

anypoint.platform.metrics_enabled=false

Log Analytics Event Data

Mule Gateway provides INFO API analytics event logging to capture data about incoming API requests.

API analytics event logging is only supported in Mule runtime versions 4.4.x and 4.5.x released after Feb 1, 2024 and Mule runtime versions 4.6.0 and later.

By default, anypoint.platform.log_analytics_events=false. Enable event logging by adding the following entry to the wrapper.conf file:

anypoint.platform.log_analytics_events=true
Due to additional log generation, events logging might affect the performance of the request processing.

Logs appear in the following format:

com.mulesoft.mule.runtime.gw.analytics.logger.AnalyticsHttpEventsLogger: {"api_id":XX,"api_version_id":XX,"org_id":"XXX","host_id":"XXXX","client_id":XXX,"transaction_id":XXX,"received_ts":"XXX","replied_ts":"XXX","client_ip":"XX","verb":"GET","path":"/backend","status_code":200,"user_agent":"XXX","request_bytes":0,"response_bytes":150,"request_disposition":"XXX","policy_violation":null,"event_id":"XXX","deployment_type":null}

Manage Logs and Troubleshoot

If an error occurs during the metrics collection process, your Mule application’s ability to complete other tasks is not affected. Additionally, all entries related to the metrics collection is logged as DEBUG in the following packages to avoid cluttering the log files:

  • In Mule 3 runtimes:

    • com.mulesoft.module.client.metrics

    • com.mulesoft.module.metrics

  • In Mule 4 runtimes,com.mulesoft.mule.runtime.gw.metrics

If you encounter issues with this feature:

  1. Contact MuleSoft Support and supply them with the metrics logs listed in the previous section.

  2. Disable the configuration until Support is able to resolve your issue.