View logs in context — with your errors and traces

Logs are most useful when they’re connected to what you're debugging — issues, traces, and the code itself. Sentry brings logs into the same view as errors and performance, so you can see what happened and why, without switching tools or losing context.

Logs connected to your issues

See the logs behind a failed cron job, dropped webhook, or bad deploy—right from the issue.

  • View logs alongside stack traces, releases, and traces—like seeing job_type:"refresh_tokens" right next to the exception

  • Understand what happened before and after an error—like the status:500 response from a third-party API that preceded a crash

Trace-connected logs for faster debugging

Sentry connects structured logs to traces, so you can spot retry loops, fallback logic, or silent failures that don’t throw exceptions.

  • View logs inline with spans—like seeing retry=true or response_time:3000 right where the delay occurred

  • Understand slowness across services by following logs tied to span_id, trace_id, or custom fields

Structured logging that makes search easy

Structured logs in Sentry make it easy to search by real metadata—not just raw strings.

  • Attach properties like customer_id or payment_id to your log messages

  • Filter and search logs with queries like customer_id:"cus_123" or payment_id:"pay_456" to zero in on specific issues

  • Group logs by fields like payment_id to surface repeat failures tied to the same transaction

  • Trigger alerts based on structured values—like a spike in errors for a single customer

From log to root cause

Livestream logs

See new logs as they arrive.

Log-Based Alerts

Get notified on patterns or anomalies

Log Dashboards

Visualize key trends and fields

Structured logs

Sentry’s structured logging lets you pass variables directly in string templates—we’ll extract both the template and its values so you can filter, group, and debug with real context, not just raw strings.

Log aggregation

A 500 error appears in Sentry. With log aggregation, you can view related logs—like timeouts or bad inputs—alongside the error to quickly find the cause.

Log -> trace -> reply in @getsentry is quite magical, glad logging is finally supported there

Greg Kedzierski

Founder & CEO,

Tailplane

Read More

I think @getsentry has become my all-in-one observability solution. It even has logs now—LFG!

@arjunz

Founder,

@techulus

Read more on X

I love it! This is fantastic! It's super simple and not bloated with unecessary features. It's already helped me solve multiple bugs without needing to SSH in my server.

V.T.

ALREADY LOVING LOGS!! Finally we will be able to fully migrate to Sentry!

A.S.A

Getting Started Platforms Scrolling Logo Background Getting Started Platforms Scrolling Logo Background Getting Started Platforms Scrolling Logo Background Getting Started Platforms Scrolling Logo Background Getting Started Platforms Scrolling Logo Background Getting Started Platforms Scrolling Logo Background

Getting started with Sentry is simple

We support every technology (except the ones we don't).
Get started with just a few lines of code.

Copied!
sentry_sdk.init(
    dsn="https://0cc5731bdda0c5987a6e7f04019a2e72@o4508482493284432.ingest.de.sentry.io/4508482513338453",
    enable_logs=True,
)
Copied!
\Sentry\init([
    'dsn' => 'https://238ed7e0b8c33a786e0a19b534bda162@o4508130833793024.ingest.us.sentry.io/4509481458204672',
    // Enable logs to be sent to Sentry
    'enable_logs' => true,
]);

// Somewhere at the end of your execution, you should flush the logger to send pending logs to Sentry.
\Sentry\logger()->flush();
Copied!

import io.sentry.SentryLevel;
import io.sentry.android.core.SentryAndroid;
import android.app.Application;

public class MyApplication extends Application {
  public void onCreate() {
    super.onCreate();
    SentryAndroid.init(this, options -> {
      options.setDsn("https://238ed7e0b8c33a786e0a19b534bda162@o4508130833793024.ingest.us.sentry.io/4509481458204672");
      options.getLogs().setEnabled(true);
    });
  }
}```
Copied!
import io.sentry.Sentry;

Sentry.init(options -> {
  options.setDsn("https://238ed7e0b8c33a786e0a19b534bda162@o4508130833793024.ingest.us.sentry.io/4509481458204672");
  options.getLogs().setEnabled(true);
});```
Copied!

Sentry.init({
  dsn: "https://238ed7e0b8c33a786e0a19b534bda162@o4508130833793024.ingest.us.sentry.io/4509481458204672",
  // Enable logs to be sent to Sentry
  enableLogs: true,
});
Copied!

'channels' => [
    // ...
    'sentry_logs' => [
        'driver' => 'sentry_logs',
        // The minimum logging level at which this handler will be triggered
        // Available levels: debug, info, notice, warning, error, critical, alert, emergency
        'level' => env('LOG_LEVEL', 'info'), // defaults to `debug` if not set
    ],
],
Copied!

Sentry.init({
  dsn: "https://238ed7e0b8c33a786e0a19b534bda162@o4508130833793024.ingest.us.sentry.io/4509481458204672",
  // Enable logs to be sent to Sentry
  enableLogs: true,
});
Copied!

Sentry.init({
  dsn: "https://238ed7e0b8c33a786e0a19b534bda162@o4508130833793024.ingest.us.sentry.io/4509481458204672",
  // Enable logs to be sent to Sentry
  enableLogs: true,
});

Logging FAQs

Sentry Logs is currently available for all users. You get 5GB of logs for free and are $0.50/GB after that. Learn more in docs.

When debugging, logs, traces, and errors work better together. Logs provide the granular context—like retries, API failures, and internal state—that spans and errors can miss. But in most tools today, logs live in a separate system, forcing you to switch between tools to piece together the full picture.

With logs in Sentry, everything is in one place. You can see logs right alongside your errors and traces—no more context switching, just faster debugging.

Getting started is just as easy as adding a console.logor logger.info. Our SDKs handle the heavy lifting, automatically linking your logs to traces and errors so you get the full context with minimal setup.

Check out our docs to read more.

Of course we have more logging content

Get monthly product updates from Sentry

Sign up for our newsletter.

And yes, it really is monthly. Ok, maybe the occasional twice a month, but for sure not like one of those daily ones that you just tune out after a while.

By filling out this form, you agree to our privacy policy. This form is protected by reCAPTCHA and Google's Privacy Policy and Terms of Service apply.

Fix It

Get started with the only application monitoring platform that empowers developers to fix application problems without compromising on velocity.