Logs

Structured logs allow you to send, view and query logs and parameters sent from your applications within Sentry.

With Structured Logs, you can send text-based log information from your applications, whether frontend or backend, to Sentry.

Sentry's structured logs are searchable, trace-connected, and viewable alongside your errors.

What does trace-connected mean? Every log entry is automatically linked to the active trace when it was recorded. This means you can click directly from any log entry to see the full trace waterfall, including all related spans, errors, and other logs from the same request. This connection makes it easy to understand the complete context of what happened—not just what was logged, but the entire execution path that led to that log entry.

When investigating an issue, you can search your logs by message content or attributes, then click into any log entry to see the exact trace, spans, and errors that occurred at that moment. Learn more about Trace View to understand how to navigate from logs to traces.

Not everything in your application generates an error or requires full tracing. Logs are perfect for tracking:

  • Debugging information: Cache misses, database connections, query results, and performance metrics
  • User behavior: Login events, checkout flows, feature usage, and preference changes
  • Application state: Configuration loading, service initialization, and connection status
  • Business events: Order placements, payment processing, and notification delivery

Learn how to send structured logs with custom attributes that you can search and filter in Sentry.

To get started with Logs, navigate to the Getting Started page and select your SDK from the list.

If you're using a platform where you can't install the Sentry SDK directly, or if you want to forward logs from platform-native logging systems, you can use log drains to send logs to Sentry.

Raw Text Search
Raw text search is case sensitive and allows you to search for specific strings within the message attribute of the Log. Raw text search over the entire log's JSON is not supported. Learn more about search syntax.