Logs that already know your users
Events, requests, state changes, and session replays in one place – one of the tools that makes your product self-driving by giving agents the backend signal to find a bug and ship the fix, tied to the user who hit it.
Install with AI in a single prompt
Paste into your terminal or code editor and make AI do the work.
What does it do?
Logs stores the records your services emit at runtime – requests handled, errors hit, decisions made – so you can search by service, severity, and attribute instead of grepping text files. Point any OpenTelemetry (OTLP) client at PostHog (no proprietary SDK), group similar lines into patterns to see what changed, and open any record to have PostHog AI explain it.
Who is it for?
Logs is used across teams depending on your role.
How do I use it?
There are a few ways to explore Logs.
Debug logs from your editor
The PostHog MCP server gives coding agents direct access to your logs. Ask your agent to search, filter, and analyze log data without leaving your editor, then fix the bug in the same session.
Top features
Logs you can actually query
Filter, aggregate, and explore logs by attributes instead of scrolling text. No need to learn another query language
AI prompts
Ask PostHog AI to find error logs, mine patterns, and explain what changed. Works in PostHog AI (in-app chat), PostHog Desktop (our AI code editor), and in your product editor (using the MCP). Already signed in? Click a prompt to try it.
Queryquery-logs
- “Show me all error-level logs from the payments service in the last hour”
- “Show me all error logs from the last hour”
- “Find logs related to the spike in 500 errors after the latest deploy”
- “Find logs related to trace ID abc123”
- “Show me warning and error logs from the last 24 hours, excluding debug noise”
Patternslogs-patterns
Compare windowslogs-patterns-diff
Explore schemalogs-attributes-list
Serviceslogs-services-create
Install
PostHog Logs works with any OpenTelemetry-compatible client. You don't need any PostHog-specific packages – just use standard OpenTelemetry libraries.
Web frameworks
Popular
All
Feature comparison
Works with other PostHog tools
Use Logs with these other PostHog apps to maximize shareholder value.
Works with...
Session Replay
Navigate from a log entry directly to the session replay to see what the user was doing when the backend failed
Error Tracking
See Error Tracking issues that occurred during the same session directly in the log details
Product Analytics
Go from a log line to product analytics for the same user – what they did, which path they took, and what broke in between
Feature Flags
Include flag variants in log context so you can see which experiment or rollout a failing request was on
Get started – free
No credit card required. You get the first 10 GBs free every month, then pricing starts at $0.25/GB and reduces with volume.