About
Modal’s OpenTelemetry integration exports your workspace’s logs to any backend that supports the OpenTelemetry HTTP API. Point it at your Sazabi intake URL and Modal pushes the logs of every Modal Function from its own servers. There is nothing to install, and no code, image, or deploy changes; the logs in Modal’s dashboard are unchanged. Modal’s OpenTelemetry guide doesn’t list the attributes on exported logs. For its Datadog integration, Modal documentscontainer_id, app_id, app_name, function_id, function_name, function_call_id, input_id, sandbox_id, environment, workspace, and workspace_id. Sazabi keeps whatever resource and log attributes Modal sends.
Modal also exports audit logs through the same integration on the Enterprise plan, where audit logs are available.
Sandboxes. Modal’s OpenTelemetry guide lists Function logs and audit logs and doesn’t say whether Sandbox logs are exported. The log attributes Modal documents for Datadog include
sandbox_id, which suggests Sandbox entrypoint logs are forwarded too, but Modal doesn’t confirm it. Output of commands run with Sandbox.exec() is not part of a Sandbox’s logs, so it isn’t exported; log it from the code that calls exec().Plans. Modal’s OpenTelemetry guide doesn’t restrict the integration to a plan, and the pricing page doesn’t list it as a paid feature. Audit logs are Enterprise-only. Custom metrics and spans are a beta Modal enables on request.Prerequisites
- A Modal workspace, and permission to create Secrets and edit the workspace’s metrics settings
- Your Sazabi intake URL, shown above — open the log source and copy the Intake URL from its setup screen (the public key is embedded in the URL)
Set up in the dashboard
1
Create the Modal Secret
Modal sends the auth header from a Modal Secret: each key namedOTEL_HEADER_<name> becomes the HTTP header <name>. In the Modal dashboard, open Secrets and create a new Secret from the OpenTelemetry template. Name it sazabi-otel and give it exactly one key, removing any others the template pre-fills:The setup screen above shows the value with your public key filled in.
2
Point the integration at Sazabi
Open Modal’s metrics settings. Set the OpenTelemetry push URL to your intake URL exactly as shown, with no/v1/logs path (Modal wants the base URL and adds the path itself), and choose the sazabi-otel Secret. Save your changes.3
Send a test log
Click the integration’s test button. Modal sends aHello from Modal! 🚀 log from the modal.test_logs service.Set up with the CLI
You can also register the Modal log source with the Sazabi CLI (installed and authenticated — see CLI reference). Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):Bearer sazabi_public_ followed by the first label of the URL’s hostname. Run sazabi log-sources get <log-source-id> at any time to reprint the endpoint, or sazabi log-sources list to see every log source in the project. The Modal dashboard steps above are still needed.
Verify
Open the Intake page in the Sazabi dashboard and confirm theHello from Modal! 🚀 test log from the Modal source appears within a minute or two. Then run any Modal Function and search for its output.
Troubleshooting
The test log doesn’t arrive — Check that the push URL is the intake URL exactly, with no/v1/logs suffix, and that the Secret’s key is OTEL_HEADER_Authorization with the value Bearer <your public key>.
Function logs don’t arrive but the test log did — Modal exports logs produced after the integration was saved; older logs aren’t backfilled. Run the Function again.
Metric data points appear as log lines — Modal also pushes container metrics to the same URL. Sazabi stores those data points as plain log lines, not as metrics.
Sandbox command output is missing — Output of Sandbox.exec() commands isn’t part of a Sandbox’s logs, so Modal doesn’t export it. Log it from the code that calls exec().
Further reading
Intake
See per-source ingestion volume and health.
Log sources
Browse the full log source catalog.