---
schema_version: "1"
id: 07255eb8de1f0d9240156a6b5799ca4fb0340823ad81cd7019fc2369ed957da9
title: Collecting Mule Gateway Metrics
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-gateway/mule-gateway-metrics.md
canonical_url: https://docs.mulesoft.com/mule-gateway/mule-gateway-metrics
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 48f9e9bd5bb711b7675991a803bc7501bb4c9206d393f74f3853f8b6c4c99414
description: MuleSoft Documentation Site
latest: true
---
---
product: Mule Gateway
---

# Collecting Mule Gateway Metrics

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

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.

> [!NOTE] 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:

```conf
anypoint.platform.log_analytics_events=true
```

> [!IMPORTANT] 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 `com.mulesoft.mule.runtime.gw.metrics` package to avoid cluttering the log
files.

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.
