Talaria

Docs / SDKs / Silverstripe

Silverstripe

Silverstripe CMS module — Injector / Monolog wiring on top of the PHP SDK.

Built on the PHP SDK. Use this guide for CMS / Injector / Monolog wiring.

Install

bash
composer require talaria/silverstripe

Configure (Injector)

Register the client with a project API key (tal_live_…). Prefer env vars over committing keys into YAML.

injector.ymlyaml
SilverStripe\Core\Injector\Injector:
  Talaria\SilverStripe\Client:
    constructor:
      apiKey: '${TALARIA_API_KEY}'
      dsn: 'https://api.newtalaria.com'
      environment: '${SS_ENVIRONMENT_TYPE}'

Monolog handler

Push a Talaria handler onto your logger so CMS and module logs become events:

php
use Monolog\Logger;
use SilverStripe\Core\Injector\Injector;
use Talaria\SilverStripe\Client;
use Talaria\SilverStripe\Handler\TalariaHandler;

$logger = new Logger('app');
$logger->pushHandler(new TalariaHandler(
    Injector::inst()->get(Client::class)
));

$logger->error('Payment failed', ['area' => 'checkout']);

Capture exceptions

php
use SilverStripe\Core\Injector\Injector;
use Talaria\SilverStripe\Client;

try {
    // your CMS / controller code
} catch (Throwable $e) {
    Injector::inst()->get(Client::class)->captureException($e);
    throw $e;
}

Environments & releases

Map SS_ENVIRONMENT_TYPE (or your deploy env) into the client environment field, and set release from your deploy pipeline so issues correlate with releases.

Troubleshooting

  • 401/403 — check API key and that it belongs to the target project.
  • No issue appears — confirm environment filter in the dashboard.
  • Rejected events — validate JSON shape against the API overview.

Need the lower-level client? See the PHP SDK or send events over HTTP via the API overview.