On this page, we get you up and running with Sentry's SDK, so that it will automatically report errors and exceptions in your application.


    Sentry captures data by using an SDK within your application’s runtime.

    Get the SDK via the Unity Package Manager using a Git URL to Sentry's SDK repository:



    Configuration should happen as early as possible in your application's lifecycle.

    You can attach Sentry to a Game Object and initialize it with the DSN programatically:

    var sentry = gameObject.AddComponent<SentrySdk>();
    sentry.Dsn = "https://examplePublicKey@o0.ingest.sentry.io/0";


    This snippet includes an intentional error, so you can test that everything is working as soon as you set it up:

    Once the SDK is configured with the DSN, you can call from anywhere:

    SentrySdk.CaptureMessage("Test event");

    To view and resolve the recorded error, log into sentry.io and open your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.

    You can edit this page on GitHub.