Logs screenshot
A hedgehog perusing some logs
Logs

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.

Get started - free

Install with AI in a single prompt

Paste into your terminal or code editor and make AI do the work.

Learn more

MCPWatch a demoTalk to a human

What does it do?

A hedgehog inspecting logs with a magnifying glass

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.

Role
Use cases
Product Engineers
Debug production issues that analytics and error tracking alone can't explain – cache misses, third-party lag, silent parse failures
Support Engineers
Jump from a person profile or session replay to every backend log written while that user was active
Platform / DevOps
Alert on error volume by service, mine patterns after a deploy, and catch services that go quiet
Backend Engineers
Inspect background jobs and request paths with no UI – the only window when something vanishes into a black box
AI-assisted teams
Let coding agents query structured logs over MCP to find the bug and draft the fix without leaving the editor

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.

Query and count logs
Filter by severity, service, time range, and free text, and pull counts or sparklines to see how a problem is trending.
Discover what's available
List log attributes and their values, and list the services sending logs with their volume and error rate.
Mine and diff patterns
Group similar log lines into templates, and compare two time ranges to see which patterns are new or spiking.
Manage alerts
Create, read, update, and delete log alerts, attach destinations, and simulate a threshold against historical logs.

Install the PostHog MCP

Learn more
npx @posthog/wizard mcp add

Supports Next.js, React, Python, and

Top features

Queryable logs

Logs you can actually query

Filter, aggregate, and explore logs by attributes instead of scrolling text. No need to learn another query language

Fast, reactive filtering
Slice by surface, severity, or attributes and see patterns update instantly
Visual feedback as you search
Sparklines respond in real time so spikes and anomalies stand out immediately
Attribute-driven navigation
Pivot the entire log view around IDs and attributes instead of scrolling line by line

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.

Install

PostHog Logs works with any OpenTelemetry-compatible client. You don't need any PostHog-specific packages – just use standard OpenTelemetry libraries.

Feature comparison

Grafana Loki
Better Stack
Datadog
Elastic
Core logging and ingestion
Centralized log ingestion & search
Collect logs from applications and infrastructure, then search and filter them in one place
Live tail & real-time logs
Native OpenTelemetry ingestion
Natively ingest and process telemetry using OpenTelemetry APIs and formats
Partial
Vendor agnostic SDKs
Search
Full-text search
Run arbitrary ad-hoc queries across raw log text
Partial
No proprietary query language
Use standard SQL or attributes instead of a vendor-specific query language
LogQL
SQL
Partial
Partial
Security and compliance
SIEM
Security event correlation and threat detection
Add-on
Compliance / enterprise scale
Petabyte-scale retention, compliance controls, and enterprise audit workflows
Investigation workflow
Click-to-pivot investigations
Logs scoped by investigation context
AI-assisted log summaries
Debugging integrations
Built-in error tracking
Group exceptions into issues so teams can triage, assign, and debug errors alongside logs
Built-in session replay
Jump from a log or error to the user session that produced it
Product analytics context
Connect logs to users, events, cohorts, funnels, retention, and feature usage
Observability
Metrics
System and app performance over time
Via stack
Traces
Traces, request journey, and latency breakdown
Alpha
Via stack
Alerting
Threshold, anomaly, and forecast alerts
Via stack
Infra monitoring
Via stack
Pricing
Ingest-only pricing
No query/compute fees
Predictable at scale
Tiered

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.

Install with AI

Run this command in your terminal or AI editor.
npx -y @posthog/wizard@latest

Supports Next.js, React, Python, and

Install without AI

Sign up for a free account and follow the install instructions for your stack.

Get started - free