To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.
Overview
ChatGPT Enterprise and Edu workspaces can use the OpenAI Compliance Logs Platform to access compliance logs for their workspace. This integration connects a ChatGPT workspace to Datadog with an Admin key and collects the log types you enable on the tile:
- Audit logs: Workspace administration and configuration activity.
- Auth logs: User sign-in and authentication activity.
- Application auth logs: Connector linking and unlinking activity.
- Codex security logs: Findings from Codex code scanning. This log type produces data only for workspaces that run Codex code scanning.
- Application logs: Requests and responses for apps used in ChatGPT, such as MCP connectors.
- Codex logs: Codex activity, including prompts, model responses, and tool and MCP calls.
- Conversation messages: User and assistant messages in ChatGPT conversations, including message content.
Setup
Prerequisites
- A ChatGPT Enterprise or Edu workspace
- The Owner or Admin role in that workspace, to create an Admin key
Configuration
Create an Admin key
Sign in to the OpenAI Admin Console.
Select your tenant if needed, then select your ChatGPT workspace.
Open Credentials > Admin keys and select Create new admin key. Enter a descriptive name.
Choose an expiration. When the key expires, collection stops until you update the account in Datadog with a new key.
Grant the read permission for each log type you plan to collect:
| Log type | Scope |
|---|
| Audit logs | chatgpt.enterprise.compliance_logs_platform.audit_log.read |
| Auth logs | chatgpt.enterprise.compliance_logs_platform.auth_log.read |
| Application auth logs | chatgpt.enterprise.compliance_logs_platform.app_auth_log.read |
| Codex security logs | chatgpt.enterprise.compliance_logs_platform.codex_security_log.read |
| Application logs | chatgpt.enterprise.compliance_logs_platform.app_log.read |
| Codex logs | chatgpt.enterprise.compliance_logs_platform.codex_log.read |
| Conversation messages | chatgpt.enterprise.compliance_logs_platform.conversation_message.read |
Select Submit, then copy the key. You cannot view it again.
Find your workspace ID
In the ChatGPT workspace settings, copy the Workspace ID from the Workspace details section. This is a UUID such as 11111111-aaaa-bbbb-cccc-dddddddddddd. Use the workspace ID, not the organization ID.
Allowlist Datadog IP addresses
This integration reads from the Compliance Logs Platform through OpenAI’s Compliance API. The Compliance API has its own IP allowlist, separate from the workspace allowlist. If the Compliance API allowlist has any entries, add the Datadog IP ranges to it:
- In ChatGPT, go to Workspace Settings > Identity & access > Access Restrictions.
- Add the Webhooks IP ranges from Datadog IP ranges to the Compliance API allowlist.
Changes can take up to 15 minutes to apply.
Connect the workspace to Datadog
In Datadog, open the OpenAI Compliance integration tile.
Select Install, open Configure, and select Add Account. Fill in the following details:
- Account name: Enter an account name that identifies the ChatGPT workspace.
- Admin API Key: Enter the key you created in the Create an Admin key section.
- Workspace ID: Enter the ID from the Find your workspace ID section.
Enable the log types you want to collect. Each option is disabled by default and requires the matching scope on the key.
Save the account.
Validation
In the Log Explorer, search for source:openai-compliance. Logs appear after the first collection completes. Application auth logs, application logs, Codex logs, and Codex security logs appear only when the corresponding activity occurs in your workspace, so an empty result for those log types is expected.
Uninstallation
- Open the OpenAI Compliance integration tile and select Configure.
- Delete each configured account to stop future collection for that account.
- Uninstall the integration from Datadog.
- If the Admin key was created exclusively for this integration, revoke it in Admin Console under Credentials > Admin keys.
Uninstalling the integration does not delete data already collected in Datadog.
Data Collected
Metrics
OpenAI Compliance does not include any metrics.
Logs
OpenAI Compliance collects the log types that you enable on the tile and assigns them the source openai-compliance. Datadog cannot ingest logs older than 18 hours, so historical logs are not imported.
Calls that this integration makes to the Compliance Logs Platform are recorded in your workspace’s audit logs as LIST_WORKSPACE_LOG_FILES and DOWNLOAD_WORKSPACE_LOG_FILE actions.
Events
OpenAI Compliance does not include any events.
Service Checks
OpenAI Compliance does not include any service checks.
Support
Need help? Contact Datadog support.