---
schema_version: "1"
id: 43a0e9f3dcc1125c2a9c448e62dbc50af2e24b45253991a8d2b1537329994e29
title: Generate Apps Diagnostics and Analyze with Einstein
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/cloudhub/ch-diagnostics-agent.md
canonical_url: https://docs.mulesoft.com/cloudhub/ch-diagnostics-agent
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 6db9fcfdc6bc488104327f070966215548cad59b4f8184438f140629f4f7c40a
description: MuleSoft Documentation Site
latest: true
---
---
product: CloudHub
---

# Generate Apps Diagnostics and Analyze with Einstein

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

You can generate diagnostics for your CloudHub apps and run an AI-powered analysis with Einstein.
Use one of these options:

- [Download diagnostics from Runtime Manager](#download-diagnostics)

- [Generate diagnostics with MuleSoft Diagnostics Agent](#run-the-mulesoft-diagnostics-agent)

## Understanding Diagnostics

Diagnostics display the Java thread dump of each CloudHub worker in each deployment. These indicate
the current state of the server, which is helpful for debugging and support. CloudHub diagnostics
include the Diagnostic Information Analysis File (DIAF).

The DIAF is a structured, standardized plain-text file. It centralizes diagnostic data and organizes
it for improved automated and manual analysis. The DIAF captures the state of events, operations,
and critical application data. See
[Mule Troubleshooting Plugin](https://docs.mulesoft.com/mule-runtime/latest/mule-troubleshooting-plugin).

DIAF is available for applications running on these Mule versions:

- 4.6.23 and later 4.6.x versions

- 4.9.10 and later 4.9.x versions

- 4.10.x and later

Without DIAF, CloudHub gives you a text file:
`_appName_-instance-_instanceId_-_workerNumber_-diag.txt`. When DIAF is included, you get a `.zip`
file instead. Open the file in a text editor or unzip the archive as needed.

## Download Diagnostics from Runtime Manager

To download diagnostics from Runtime Manager:

1.  In the **Deployments** section, select the date and worker for which you want to download
    diagnostics.

2.  Click the download icon for the worker.

3.  Select **Diagnostics**.

To download a diagnostics file directly, use this URL:

`api/v2/organizations/{{orgId}}/environments/{{envId}}/applications/{{appName}}/instances/{{instanceId}}/diagnostics`

### Analyze Diagnostics with Einstein

Before analyzing diagnostics with Einstein:

- Connect your MuleSoft organization to a Salesforce account.

- Enable Agentforce for your organization. See
  [Enable Agentforce for Your Anypoint Platform Organization](https://docs.mulesoft.com/access-management/enabling-generative-ai#enable-einstein-anypoint).

- Enable Einstein entitlement for your Anypoint Platform organization. See
  [Enable Einstein Entitlement and Routing in Anypoint Platform](https://help.salesforce.com/s/articleView?id=platform.mulesoft_enable_einstein_anypoint_platform.htm&type=5).

- Verify that you have either the Mule Developer Generative AI User or Organization Administrator
  role.

- Update your Mule runtime to 4.6.23 LTS, 4.9.10 LTS, 4.10 Edge, or later.

- Verify that your Mule application is running.

### Run Analyze with Einstein

To run and download the Einstein analysis:

1.  From Anypoint Platform, select **Runtime Manager** > **Applications**.

2.  Select the app name.

3.  In the navigation menu, select **Logs**.

4.  In the **Deployments** section, select the date and worker for which you want to run the
    analysis.

5.  Click the download icon for the worker and select **Analyze with Einstein**.

6.  After the process completes, click the download icon to download an `.html` file containing the
    analysis.

## Generate Diagnostics with MuleSoft Diagnostics Agent

On the Runtime Manager **Diagnostics** page, run the MuleSoft Diagnostics Agent to generate
diagnostics on demand for a chosen instance. Download the diagnostics for manual inspection, or
**Analyze with Einstein** (or both).

1.  From Anypoint Platform, select **Runtime Manager** > **Applications**.

2.  Select the app name.

3.  In the navigation menu, select **Diagnostics**.

4.  Select an active instance from the dropdown list.

5.  Click the **Analyze & Troubleshoot** dropdown. You have these options:

    - Select **Generate Mule Diagnostics** to generate and download the diagnostics for manual
      inspection.

      1.  Click **Download** to download the Mule diagnostics files.

    - Select **Analyze with Einstein** to generate the Mule diagnostics and run the analysis
      simultaneously.

      1.  Click **View Analysis** to open the analysis page.

### Generate Mule Diagnostics

When you choose **Generate Mule Diagnostics** and click **Download**, you get a `.zip` file. The
archive contains:

Mule Thread Dumps

A thread dump is a snapshot of all the threads in an instance that shows the current state of the
server.

Diagnostic Information Analysis File (DIAF)

The DIAF is a structured, standardized plain-text file. It centralizes diagnostic data and organizes
it for improved automated and manual analysis. The DIAF captures the state of events, operations,
and critical application data. See
[Mule Troubleshooting Plugin](https://docs.mulesoft.com/mule-runtime/latest/mule-troubleshooting-plugin).

> [!NOTE] The DIAF doesn’t replace application logs.

## Considerations and Limitations

The MuleSoft diagnostics agent uses Einstein generative AI. Limits for running analyses apply per
application and per organization:

- 10 analyses per application, per hour

- 50 analyses per organization, per hour

- 50 analyses per application, per day

- 200 analyses per organization, per day

CloudHub retains Mule diagnostics for 30 days or up to 150 MB.

## See Also

- [CloudHub API Reference](https://docs.mulesoft.com/cloudhub/cloudhub-api-reference#diagnostics)

- [Understanding Diagnostic Information Analysis File (DIAF)](https://docs.mulesoft.com/mule-runtime/latest/mule-troubleshooting-plugin#understanding-diagnostic-information-analysis-file-diaf)

- [View Log Data](https://docs.mulesoft.com/cloudhub/viewing-log-data)

- [Export Data to External Analytics Tools](https://docs.mulesoft.com/runtime-manager/sending-data-from-arm-to-external-analytics-software)

- [Monitor Applications and Servers](https://docs.mulesoft.com/runtime-manager/monitoring)

- [Deployment Options](https://docs.mulesoft.com/runtime-manager/deployment-strategies)
