{% extends "base.html" %} {% load static code %} {% block title %}Set up your SDK ยท {{ site_title }}{% endblock %} {% block content %}

Set up your SDK

Connect your PHP application to Bugsink to start tracking errors. Bugsink is compatible with the Sentry SDK. Note that the instructions for Laravel and Symfony are quite different from plain PHP. In the below we provide an overview, zoom in on the differences between Bugsink and Sentry, and provide a snippet with the correct DSN set.

Step 1: Install the SDK

Install the SDK using Composer. Run either of the following commands: {% code %}:::text PICK ONE: composer require sentry/sentry composer require sentry/sentry-laravel composer require sentry/sentry-symfony {% endcode %}

Step 2: Configure the SDK with your DSN

The steps for initialization/configuration differ between the different frameworks. Refer to the relevant document.
Configure the SDK without tracing and profiling, as Bugsink does not support these features.
Initialize and configure the SDK with your DSN:
{% code %}:::php {{ dsn }} {% endcode %}

Step 3: Verify the setup

To verify that everything is working, raise an exception on purpose and check that it appears in Bugsink. How to do this depends on the framework you are using, as per the documentation. Here's an example for plain PHP:
{% code %}:::php iWantThisToFailSoBugsinkShowsIt(); } catch (\Throwable $exception) { \Sentry\captureException($exception); } ?>{% endcode %}
Your event should now appear in the list of open issues.

Further reading

For more information on how to use the SDK, check the Bugsink-specific SDK recommendations.
{% endblock %}