---
title: Modal
description: Collect logs and metrics for your Modal applications
breadcrumbs: Docs > Integrations > Modal
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Modal
Supported OS Integration version1.9.0
{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}
  Run your generative AI models, large-scale batch jobs, job queues, and much more through Modal.See audit logs, function logs, and utilization metrics in the Modal Datadog dashboard
## Overview{% #overview %}

[Modal](https://modal.com) lets you run generative AI models, large-scale batch jobs, job queues, and much more. This integration collects logs (stdout/stderr logging from your modal applications, or audit logs for your account) that you can visualize through Datadog dashboards and set up alerts for with Datadog monitors.

## Setup{% #setup %}

### Installation{% #installation %}

To set up the Modal integration:

1. Navigate to the [**Modal** tile](https://app.datadoghq.com/integrations?integrationId=modal) on the Datadog Integrations page and click **Install Integration**.

1. Click **Connect Accounts** to begin authorization of this integration. You will be redirected to log into [Modal](https://modal.com), and once logged in, you'll be redirected to the Datadog authorization page.

1. Click the **Authorize** button to complete setup.

Logs and metrics from your Modal apps should now start appearing in Datadog.

## Data Collected{% #data-collected %}

### Logs{% #logs %}

Modal collects all application (stdout/stderr logging for functions) and audit logs.

### Events{% #events %}

Modal does not include any events.

### Metrics{% #metrics %}

|  |
|  |
| **modal.container.running**(gauge)               | Number of running containers*Shown as container*                   |
| **modal.container.terminations**(count)          | Number of terminated containers                                    |
| **modal.cpu.requested**(gauge)                   | Number of CPU cores requested                                      |
| **modal.cpu.utilization**(gauge)                 | Number of CPU cores in use                                         |
| **modal.gpu.clock**(gauge)                       | GPU clock speed*Shown as megahertz*                                |
| **modal.gpu.compute.utilization**(gauge)         | GPU compute utilization                                            |
| **modal.gpu.count**(gauge)                       | Number of GPUs attached to the container (zero for CPU containers) |
| **modal.gpu.memory.usage**(gauge)                | Amount of GPU memory in use*Shown as byte*                         |
| **modal.gpu.memory.utilization**(gauge)          | GPU memory utilization*Shown as mebibyte*                          |
| **modal.gpu.power.usage**(gauge)                 | GPU power usage*Shown as watt*                                     |
| **modal.gpu.power.utilization**(gauge)           | GPU power utilization as a fraction of TDP                         |
| **modal.gpu.temperature**(gauge)                 | GPU temperature*Shown as degree celsius*                           |
| **modal.input_events.elapsed_time_us**(count) | Elapsed time of input events*Shown as microsecond*                 |
| **modal.input_events.successes**(count)         | Number of successful completed inputs                              |
| **modal.input_events.total_inputs**(count)     | Number of completed inputs                                         |
| **modal.memory.requested**(gauge)                | Amount of memory requested*Shown as byte*                          |
| **modal.memory.usage**(gauge)                    | Amount of memory in use*Shown as byte*                             |
| **modal.memory.utilization**(gauge)              | Memory in use*Shown as mebibyte*                                   |
| **modal.network.egress.bytes**(count)            | Bytes sent by the container over the network*Shown as byte*        |
| **modal.network.ingress.bytes**(count)           | Bytes received by the container over the network*Shown as byte*    |

`modal.gpu.count` reports the number of GPUs attached to each container, or zero for CPU containers. Container resource metrics from GPU containers include the `gpu_billing_type` tag when the billing type is recognized. This tag identifies the billed GPU class (for example, `H100`), which may differ from the physical GPU model when a workload is scheduled onto a newer GPU.

`modal.network.egress.bytes` and `modal.network.ingress.bytes` report the bytes each container sent and received over the network during each sample window. They are count metrics, so summing them gives the traffic over any time range.

Container metrics from Modal Sandboxes include the `sandbox_id` tag.

## Uninstallation{% #uninstallation %}

Once this integration has been uninstalled, any previous authorizations are revoked and logs/metrics stop being emitted to Datadog.

1. Navigate to the [Modal metrics settings page](http://modal.com/settings/metrics) and select **Delete Datadog Integration**.
1. On the **Configure** tab in the Modal integration tile in Datadog, click **Uninstall Integration**.
1. Confirm that you want to uninstall the integration.
1. Ensure that all API keys associated with this integration have been disabled by searching for the integration name on the [API Keys](https://app.datadoghq.com/organization-settings/api-keys?filter=Modal) page.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Modal support](mailto:support@modal.com).
