Connecting Modal to your Datadog account

You can use the Modal + Datadog integration to export Modal function logs to Datadog. You’ll find the Modal Datadog integration available for install in the Datadog marketplace.

What this integration does

This integration allows you to:

  1. Export Modal audit logs in Datadog
  2. Export Modal function logs to Datadog
  3. [Coming Soon] Export container metrics to Datadog

Installing the integration

  1. Open the Modal Tile (or the EU tile here) in the Datadog integrations page
  2. Click “Install Integration”
  3. Click Connect Accounts to begin authorization of this integration. You will be redirected to log into Modal, and once logged in, you’ll be redirected to the Datadog authorization page.
  4. Click “Authorize” to complete the integration setup

Structured logging

Logs from Modal are sent to Datadog in plaintext without any structured parsing. This means that if you have custom log formats, you’ll need to set up a log processing pipeline in Datadog to parse them.

Modal passes log messages in the .message field of the log record. To parse logs, you should operate over this field. Note that the Modal integration does set up some basic pipelines. In order for your pipelines to work, ensure that your pipelines come before Modal’s pipelines in your log settings.

Uninstalling the integration

Once the integration is uninstalled, all logs will stop being sent to Datadog, and authorization will be revoked.

  1. Navigate to the Modal metrics settings page and select “Delete Datadog Integration”.
  2. On the Configure tab in the Modal integration tile in Datadog, click Uninstall Integration.
  3. Confirm that you want to uninstall the integration.
  4. Ensure that all API keys associated with this integration have been disabled by searching for the integration name on the API Keys page.