# Logs Datadog

> Adds PostHog log ingestion to Datadog-instrumented applications by configuring an OpenTelemetry (OTL

Adds PostHog log ingestion to Datadog-instrumented applications by configuring an OpenTelemetry (OTLP) exporter that sends structured logs to PostHog, using environment variables for keys and endpoints. Use when a user asks to send Datadog logs to PostHog, set up PostHog logs or OTLP log export, search or troubleshoot PostHog logs, or link logs to session replay.

- Page: https://ss33.ai/skills/posthog/logs-datadog-27608990359
- Publisher: posthog
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [DevOps & cloud](https://ss33.ai/skills/category/software-development-t44z8z/devops-and-cloud-unkt50)
- License: MIT
- Source: https://github.com/posthog/skills/blob/4922922c4ca74db4e6705cecbced2a46fd103f27/skills/posthog/all/skills/logs-datadog/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/posthog/logs-datadog-27608990359

# PostHog logs for Datadog

This skill helps you add PostHog log ingestion to Datadog applications.

## Reference files

- `references/datadog.md` - Datadog logs installation - docs
- `references/start-here.md` - Getting started with logs - docs
- `references/search.md` - Search logs - docs
- `references/best-practices.md` - Logging best practices - docs
- `references/troubleshooting.md` - Logs troubleshooting - docs
- `references/link-session-replay.md` - Link session replay - docs
- `references/debug-logs-mcp.md` - Debug logs with mcp - docs

Consult the documentation for API details and framework-specific patterns.

## Key principles

- **Environment variables**: Always use environment variables for PostHog keys and OpenTelemetry endpoints. Never hardcode them.
- **Minimal changes**: Add log export alongside existing logging. Don't replace or restructure existing logging code.
- **OpenTelemetry**: PostHog logs use the OpenTelemetry protocol. Configure an OTLP exporter pointed at PostHog's ingest endpoint.
- **Structured logging**: Prefer structured log formats with key-value properties over plain text messages.

## Framework guidelines

_No specific framework guidelines._
