Skip to main content

Overview

The Connector and the Endpoint run in your environment and see your traffic. The Control Plane runs in Formal’s infrastructure and stores the logs they send. This page lists what each component sends, where it is stored, how long Formal keeps it, and which settings control it.

What Each Component Sends and Stores

The Control Plane does not connect to your Resources. Only the Connector and the Endpoint handle your data. See Architecture.

Activity Logs

Connector and Endpoint logs record each session and request. Depending on the technology, a log can include query text, HTTP headers and bodies, SSH commands, and LLM messages. See What Gets Logged and the Log Schema Reference for every field. Endpoint logs can also include device details and the command line of the connecting process. See Protect Git Tokens in Command Lines for an example.

Session Data

Completed sessions keep their query and command history. SSH and Kubernetes sessions also keep a terminal recording. See Sessions.

Control Plane Audit Logs

The Control Plane logs authenticated API calls from app.formal.ai, the public API, and Terraform. Fields marked sensitive in the API schema, such as passwords, are redacted from the logged arguments. See Control Plane Logs.

Policy Evaluation Inputs

Policy evaluation inputs are the input documents your policies evaluate, such as query text or response rows. They power policy impact reports. Retention is off by default. With no log configuration, every stage has a retention of zero. When retention for a stage is zero, the Connector and the Endpoint do not send that stage’s inputs to the Control Plane at all. They also drop any single input that exceeds a size limit.

Connector Process Logs

The Connector writes its own operational logs to stdout and stderr. They stay in your environment unless you ship them to your own log collector. See Connector Health. When the Connector can’t reach the Control Plane, it buffers activity logs in memory, then spools them to /formal/logs. It retries delivery and recovers spooled logs on restart if the disk is persistent. See Log Spool.

Endpoint Agent Logs

The Endpoint agent writes main.log to a log directory on each host: Agent logs include destination hostnames and the local processes that connected to them.

Satellites

The Data Discovery Satellite runs in your infrastructure. When you configure prompt labels, it samples row values from each table and sends column metadata to the classifier.

Debug Bundles

formal debug collects Endpoint diagnostics for Formal support. It writes a zip to your current directory and does not upload it. The file is readable only by the user who ran the command. Nothing reaches Formal unless you share the file. The zip always contains:
  • Agent memory diagnostics: heap profile, goroutine dump, memory statistics, and stack samples
  • Formal processes, listed by executable name without command-line arguments
  • Content filter state (macOS)
  • Endpoint logs: main.log and, on macOS, postinstall-once.log
On macOS, formal debug first asks:
The default answer is no. If you answer y, the zip also includes a network extension sample and an Apple sysdiagnose. A sysdiagnose is a full macOS system report. It can contain usernames, serial numbers, configuration profiles, running processes with their arguments, network details, and system logs. Treat a zip that contains a sysdiagnose as confidential. Answer N unless Formal support asks for it. Verify:

Retention

For longer retention or your own deletion schedule, forward logs to storage you own. See Export Logs to Your Own Storage.

Configure Policy Input Retention

Set retention for the Session, Request, and Response stages in Log Configurations. Scope a configuration to a Resource, a Connector, a Space, or the whole account. The most specific match wins. Valid durations are 1d, 2d, 3d, 7d, 14d, 21d, and 30d. Changes can take up to a day to apply. See Policy Evaluation Input Retention for the Terraform resource.
Policy inputs contain the data your policies inspect, including any secrets in queries, headers, or command lines. Keep retention off for Resources that carry secrets. Log schemas do not apply to retained policy inputs.
Verify: Open Log Configurations. If no configuration lists a retention for a stage, Formal does not retain that stage’s inputs.

Redact Sensitive Data

Formal has three controls for sensitive data. Each acts at a different point. Log schemas run before a log leaves your environment, so dropped fields never reach the Control Plane. encrypt and encrypt_sql use an asymmetric key you manage. See Encryption Keys. Verify: After you apply a log schema, open Logs and inspect a new matching log. The selected fields are missing, truncated, or encrypted.

Export Logs to Your Own Storage

Log Integration forwards all logs to a destination you own. Supported destinations include AWS S3, Google Cloud Storage, Google Cloud Pub/Sub, Azure Blob Storage, Datadog, Splunk, and Panther. You then control retention and deletion in that system. Log schemas apply before forwarding, so forwarded logs carry the same changes. Verify: Open SIEM and confirm your integration is listed. Then check your destination for new log objects or events.

Troubleshooting

Cause: The log field holds the raw query, header, body, or command line. Fix: Add a log schema that drops or encrypts that field. The schema applies to new logs only.
Cause: Policy input retention is off for that stage, which is the default. Fix: Set a retention in Log Configurations, then wait up to a day for new inputs.
Cause: The /formal/logs spool wasn’t on a persistent volume. Fix: Mount a persistent volume at /formal/logs. See Log Spool.
Cause: The user answered y to the sysdiagnose prompt on macOS. Fix: Run formal debug again and answer N to get a zip with only Formal diagnostics and logs.

Next Steps

Log Schemas

Drop or encrypt sensitive log fields

Log Integration

Forward logs to your own storage

Logs

Search and configure policy input retention

Connector Deployment

Deploy the Connector in your infrastructure