parkweb/ase-php

Generic PHP SDK for All Seeing Eye event ingestion.

Maintainers

Package info

github.com/Parkweb-IT-B-V/ase-php

pkg:composer/parkweb/ase-php

Transparency log

Statistics

Installs: 24

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.4 2026-07-25 18:11 UTC

This package is not auto-updated.

Last update: 2026-07-25 18:13:35 UTC


README

Generic PHP SDK for All Seeing Eye.

composer require parkweb/ase-php php-http/discovery guzzlehttp/guzzle nyholm/psr7
use ParkWeb\Ase\Ase;
use ParkWeb\Ase\Client;
use ParkWeb\Ase\ClientOptions;
use ParkWeb\Ase\Dsn;
use ParkWeb\Ase\ErrorHandler;
use ParkWeb\Ase\Level;
use ParkWeb\Ase\Transport\BufferedTransport;
use ParkWeb\Ase\Transport\SyncTransport;

$options = ClientOptions::fromArray([
    'dsn' => $_ENV['ASE_DSN'],
    'release' => $_ENV['ASE_RELEASE'] ?? null,
    'sample_rate' => 1.0,
    'timeout' => 1.5,
    'max_retries' => 1,
    'gzip' => true,
    'send_default_pii' => false,
]);

$dsn = Dsn::parse($options->dsn);
$transport = new BufferedTransport(new SyncTransport($options, $dsn, $psr18Client, $requestFactory, $streamFactory, $logger));
$client = new Client($options, $transport);
Ase::init($client);
(new ErrorHandler($client))->register();

Ase::setUser(['id' => '123']);
Ase::setTag('tenant', 'acme');
Ase::addBreadcrumb(['category' => 'checkout', 'message' => 'Payment submitted']);
Ase::captureMessage('Slow checkout dependency', Level::Warning);
Ase::captureException($throwable);
Ase::flush();

DSN format:

https://{server-token}@api-ase.parkwebit.nl/api/v1/ingest/envelope

Legacy https://{server-key-id}:{server-secret}@... DSNs are still supported, but new installs should use the single-token format. The SDK derives the public key id internally and still signs requests with HMAC.

Safety defaults:

  • SDK failures are swallowed.
  • Short timeout and one retry by default.
  • Authorization, cookies, tokens, passwords, private keys and card-like values are scrubbed.
  • Request bodies are not captured unless the integration explicitly adds them.
  • HMAC headers are generated per request and the server key is never logged.

Run package smoke tests:

php tests/run.php