Follow a release regression from the failing endpoint to the exact customer accounts it affects in the public, read-only workspace.
composer require apirelio/nette
export APIRELIO_API_KEY=apr_live_your_project_keyCopy the minimal setup below or run the quickstart example. Delivery is fail-safe and no request or response payloads are captured.
Documentation · Packagist · Apirelio
Connect Nette API errors, latency and releases to the affected customers without capturing request or response payloads.
Fail-safe customer integration analytics for Nette applications. The package uses the shared
apirelio/php-core event contract, sanitization,
retry and file buffer.
- PHP 8.2+
- Nette Application 3.2 or 3.3
- ext-curl
composer require apirelio/nette:^0.2Register the native DI extension:
extensions:
apirelio: Apirelio\Nette\DI\ApirelioExtension
apirelio:
apiKey: %env.APIRELIO_API_KEY%
endpoint: https://apirelio.com
service: billing-api
environment: production
release: 2026.07.29.1
paths:
- /api/*
metadataKeys:
- regionThe extension automatically records matched Nette application requests through onRequest,
onResponse and onError. Delivery failures are swallowed and optionally logged, so analytics
cannot change the customer response.
The default fileBuffer transport persists events before sending them. Use a writable application
temp directory:
apirelio:
transport: fileBuffer
bufferPath: %tempDir%/apirelio/events.ndjson
batchSize: 500
flushIntervalSeconds: 10For direct synchronous delivery:
apirelio:
transport: syncInject Apirelio\Nette\ApirelioManager into a presenter or service:
use Apirelio\Nette\ApirelioManager;
final class InvoiceService
{
public function __construct(private ApirelioManager $apirelio) {}
public function create(): void
{
$this->apirelio->addMetadata(['region' => 'eu-central']);
$this->apirelio->setErrorCode('VALIDATION_FAILED');
}
}Only keys listed in metadataKeys are retained. Secrets, request bodies, query parameters,
cookies and authorization headers are never collected.
$apirelio->track(
event: 'invoice.created',
integration: 'fakturoid',
metadata: ['region' => 'eu-central'],
);Implement the resolver contracts:
use Nette\Application\Request;
use Apirelio\Nette\Contracts\CustomerResolver;
use Apirelio\Nette\Data\ApirelioCustomer;
final class CurrentCustomerResolver implements CustomerResolver
{
public function resolve(Request $request): ?ApirelioCustomer
{
return new ApirelioCustomer('customer_42', 'Acme Europe', 'growth');
}
}Register the services and reference their service names:
services:
app.customerResolver: App\Analytics\CurrentCustomerResolver
app.applicationResolver: App\Analytics\CurrentApplicationResolver
apirelio:
customerResolver: app.customerResolver
applicationResolver: app.applicationResolvercomposer test
composer phpstan