PHP and Laravel

Install composer require blipit/blipit

Install the blipit/blipit package and call init once with your project's public key and project id. Uncaught exceptions and errors are reported on their own.

1Install

sh
composer require blipit/blipit

2Initialise at startup

Plain PHP: at the top of your front controller. Laravel: in AppServiceProvider::boot. Both values are on the project's Keys page.

php
use Blipit\Blipit;

Blipit::init([
    "key" => "<public key>",
    "project" => <project id>,
    "environment" => "production",
    "release" => "myapp@1.4.2",
]);

3Manual capture and login attempts

php
Blipit::captureException($e);
Blipit::captureMessage("cache miss rate above 50%", "warning");
Blipit::setUser(["id" => "42", "email" => "ana@example.com"]);
Blipit::captureSecurity("login_failed", $email, "bad_password", null, $request->ip(), $request->userAgent());

4Check it works

Open Issues in app.blipit.io. The first event appears within a few seconds, grouped into an issue, and the people in charge get an email.

php
Blipit::captureMessage("Hello from PHP");

Good to know

  • Laravel's full integration (request context, queue jobs, Artisan) comes from the sentry/sentry-laravel package; it works unchanged with SENTRY_LARAVEL_DSN=https://<public key>@in.blipit.io/<project id>.
  • Pass "traces_sample_rate" => 0.2 in init and requests show up on the Performance page.

Stuck? Email support@blipit.io. Keys and the exact DSN for each project are under API keys in app.blipit.io.