Set Up Logs

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

With Sentry Structured Logs, you can send text based log information from your applications to Sentry. Once in Sentry, these logs can be viewed alongside relevant errors, searched by text-string, or searched using their individual attributes.

Logs for .NET are supported in Sentry .NET SDK version 5.14.0 and above.

To enable logging, you need to initialize the SDK with the Experimental.EnableLogs option set to true.

Copied
SentrySdk.Init(options =>
{
    options.Dsn = "https://examplePublicKey@o0.ingest.sentry.io/0";
    // Enable logs to be sent to Sentry
    options.Experimental.EnableLogs = true;
});

Available integrations:

If there's an integration you would like to see, open a new issue on GitHub.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").