Talaria
Talaria

PHP and Silverstripe performance, without a host agent.

Time requests, see PDO/ORM and outbound HTTP as child spans, catch N+1, and continue W3C traceparent from @newtalaria/browser. Issue-first errors stay the product — APM is SDK-native.

Request timing from the SDK

Incoming HTTP becomes a SERVER transaction (GET /checkout). Silverstripe ships HTTPMiddleware; other stacks use PSR-15 or IncomingHttp::startTransaction(). Tracing stays off until enableTracing or tracesSampleRate > 0.

talaria.phpphp
Talaria::init([
    'dsn' => getenv('TALARIA_DSN') ?: 'https://api.newtalaria.com',
    'apiKey' => getenv('TALARIA_API_KEY'),
    'environment' => 'production',
    'enableTracing' => true,      // off until you opt in
    'tracesSampleRate' => 0.1,    // 10% of successful requests; errors always traced
]);

$tx = Talaria::startTransaction('GET /checkout');
$span = Talaria::startSpan('mysql SELECT', 'client', [
    'db.system.name' => 'mysql',
    'db.operation.name' => 'SELECT',
]);
$span->end();
$tx->end();

PDO, ORM, and N+1

Wrap PDO with TracingPdo (or use Silverstripe TracingMySQLDatabase). Repeated identical db.query.text is flagged as N+1 in the dashboard — literals are stripped before ingest. Redis (Predis / phpredis) is an opt-in wrap, not a required extension.

pdo.phpphp
$pdo = new TracingPdo($pdo, Talaria::getClient(), 'mysql');
$stmt = $pdo->prepare('SELECT * FROM "Product" WHERE "ID" = ?');
$stmt->execute([$id]); // each execute is a child span — N+1 stays visible

Browser traceparent

@newtalaria/browser injects W3C traceparent on first-party fetch and XHR. PHP parses that header before X-Request-Id, so a pageload and the Silverstripe request share one waterfall. Talaria::getTraceparent() continues the trace on outbound Guzzle.

browser.jsjavascript
Talaria.init({
  dsn: "https://api.newtalaria.com",
  apiKey: "tal_live_…",
  enableTracing: true,
  tracesSampleRate: 0.1,
});
// First-party fetch/XHR get traceparent; PHP continues the same trace.

See the waterfall on your next deploy

Create a project, turn on enableTracing, and open Performance — sampled transactions only; child spans are included, not billed.