GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Guide
  • Examples
  • Log in
  • Sign up

This view

  • Original page
  • New address

GeezerVison is showing modal.com — Connecting Modal to your Datadog account

Guide Introduction to Modal Getting started Functions Functions Invocation methods Function lookups Container lifecycle management Parametrized Functions Dynamic configuration Sandboxes Sandboxes Running commands Networking and security File access Snapshots Exit Snapshots BetaPricing and resources Sidecars BetaSecret injection BetaModel APIs Model APIs Models and pricing Agent integrations Endpoints Endpoints Supported models Candidates Training Quickstart Tinker-compatible API BetaMulti-node training Images Defining Images Using existing container images Named images Fast pull from registry GPUs and other resources GPU acceleration Using CUDA on Modal Configuring CPU, memory, and disk Scaling out Scaling out Input concurrency Batch processing Job queues Dynamic batching Multi-node Clusters Deployment Apps, Functions, and entrypoints Managing deployments Continuous deployment Scheduled Functions Observability HTTP Applications Servers Sticky Sessions Web Functions Streaming endpoints Web Function URLs Request timeouts Proxy Tokens Networking Tunnels Proxies BetaCluster networking Data sharing and storage Passing local data Volumes Storing model weights Cloud bucket mounts Dicts Queues Dataset ingestion Secrets and environment variables Secrets Environment variables Performance Cold start performance Memory Snapshots High-performance LLM inference Reliability and robustness Failures and retries Preemption Timeouts GPU health Troubleshooting Security and privacy Security and privacy Data residency Customer-supplied encryption keys AlphaAudit logs Integrations Using OIDC to authenticate with external services Connecting Modal to your Datadog account Connecting Modal to your OpenTelemetry provider Slack notifications Workspace & account settings Workspaces Environments Service users User groups Role-Based Access Control (RBAC) Billing Network egress billing Budgets Identity and provisioning Okta SSO Microsoft Entra SSO Google Workspace SSO Custom SAML SSO SCIM Integration Other topics Feature maturity Restricted Functions JavaScript/Go SDKs BetaModal 1.0 migration guide File and project structure Developing and debugging Jupyter notebooks Asynchronous API usage Global variables Region selection Localized placement GPU Metrics Search syntax

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, Sandbox, and Server logs to Datadog
  3. Export Modal Function, Sandbox, and Server metrics to Datadog

Installing the integration 

Connecting this integration creates an API key in your Datadog account, which requires Datadog org owner permissions. If you aren’t an org owner, ask one to complete the connection.

  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

Metrics 

The Modal Datadog Integration will forward the following metrics to Datadog:

  • modal.cpu.utilization
  • modal.memory.usage
  • modal.gpu.memory.usage
  • modal.gpu.compute.utilization
  • modal.gpu.power.usage
  • modal.gpu.power.utilization
  • modal.gpu.temperature
  • modal.gpu.clock
  • modal.gpu.count
  • modal.network.egress.bytes
  • modal.network.ingress.bytes
  • modal.container.running
  • modal.container.terminations
  • modal.input_events.elapsed_time_us
  • modal.input_events.input_queue_time_us
  • modal.input_events.coldstart_time_us
  • modal.input_events.successes
  • modal.input_events.total_inputs
  • modal.function.pending_inputs
  • modal.function.running_inputs

All metrics are tagged with container_id, environment_name, app_name, app_id, function_name, function_id, workspace_name, and workspace_id. Metrics from GPU containers are additionally tagged with gpu_billing_type, the GPU type the container is billed as (e.g. H100), which may differ from the physical GPU model when a workload is scheduled onto a newer GPU. Metrics from Sandboxes are additionally tagged with sandbox_id. modal.container.terminations is instead tagged with container_id, environment_name, app_name, app_id, workspace_name, workspace_id, object_id, object_type, and reason.

Deprecated metrics:

  • modal.memory.utilization (use modal.memory.usage)
  • modal.gpu.memory.utilization (use modal.gpu.memory.usage)

modal.network.egress.bytes counts the bytes a container sends, the same traffic metered for network egress billing.

modal.input_events.successes and modal.input_events.total_inputs can be used to measure the success rate of a certain function or app.

As an official Datadog integration, Modal metrics are free on Datadog while logs are charged.

Log attributes 

Logs forwarded to Datadog include the following attributes:

  • container_id
  • app_id
  • app_name
  • function_id
  • function_name
  • function_call_id
  • input_id
  • sandbox_id
  • environment
  • workspace
  • workspace_id

These are log attributes, not tags. You can filter and search by them in Datadog’s Log Explorer using the @ prefix (for example, @container_id:<value>).

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.

Cost Savings 

The Modal Datadog Integration will forward all logs to Datadog which could be costly for verbose apps. We recommend using either Log Pipelines or Index Exclusion Filters to filter logs before they are sent to Datadog.

All logs include the environment attribute. The simplest way to filter logs is to create a pipeline that filters on this attribute and to isolate verbose apps in a separate environment.

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.
Connecting Modal to your Datadog accountWhat this integration doesInstalling the integrationMetricsLog attributesStructured loggingCost SavingsUninstalling the integration
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.