Datadog logs installation
Logs is free to use whilst in beta, though we'd love to hear your feedback in app.
If you're already using Datadog to collect logs, you can forward them to PostHog by configuring your existing Datadog log exporters (like the Datadog Agent) to send logs to PostHog's Datadog-compatible endpoint.
- 1
Get your project API key
RequiredYou'll need your PostHog project API key to authenticate log requests. This is the same API key you use for capturing events and exceptions.
You can find your project API key in Project Settings.
- 2
Configure Datadog Agent
RequiredSet the Datadog logs URL to point to PostHog's Datadog-compatible endpoint. The endpoint format is:
For the Datadog Agent, set the
DD_LOGS_CONFIG_LOGS_DD_URLenvironment variable:TerminalAlternatively, you can set this in your
datadog.yamlconfiguration file:YAMLReplace
<YOUR_PROJECT_API_KEY>with your actual PostHog project API key. - 3
Other Datadog log exporters
OptionalIf you're using other Datadog log exporters or forwarders, configure them to send logs to the same endpoint:
The endpoint accepts logs in the standard Datadog log format, so existing integrations should work without additional changes.
- 4
Test your setup
Recommended Next steps
CheckpointWhat you can do with your logs