Download the PHP package kronn/observability without Composer
On this page you can find all versions of the php package kronn/observability. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kronn/observability
More information about kronn/observability
Files in kronn/observability
Package observability
Short Description Telemetria e APM da plataforma Kronn para aplicações Laravel.
License MIT
Homepage https://kronn.io
Informations about the package observability
kronn/observability
Telemetry and APM SDK for the Kronn platform, built for Laravel applications.
Instruments the framework's lifecycle — HTTP requests, Artisan commands, database queries, queued jobs, outgoing HTTP calls, cache events, mail, notifications, exceptions and logs — and ships records to the Kronn backend.
Status:
0.1.0-dev. The Kronn ingest backend is still being built. While that's in progress, setKRONN_TRANSPORT=logto inspect the records the SDK would emit, locally atstorage/logs/kronn.ndjson.
Supported versions
- PHP 8.2+
- Laravel 10.x / 11.x / 12.x / 13.x
Installation
Configuration
Production (target, once HttpTransport ships)
A single environment variable is all that's needed:
Note for v0.1.0-dev:
HttpTransportis not implemented yet. Once it ships, the default ofKRONN_TRANSPORTflips tohttpand the production.envreduces to justKRONN_API_KEY.
The API key is generated inside Kronn (Observability → Enable). Paste it into your .env and the SDK starts shipping telemetry to the backend automatically.
The backend endpoint is hardcoded to https://ingest.kronn.io/v1/ingest. You do not need to configure it.
Development (no backend running yet)
To inspect the records the SDK would send without making any network calls:
Records are written as NDJSON to storage/logs/kronn.ndjson, one per line, ready to inspect with cat/jq.
Test environment
In phpunit.xml (or equivalent):
The null driver discards everything silently — tests stay isolated with no side effects.
Endpoint override (internal dev/staging only)
The KRONN_INGEST_URL variable lets you point the SDK at non-production environments — staging, a local ingest instance, etc. Production customers never need to touch it.
Publishing the config (optional)
For customization beyond what env vars cover (filters, thresholds, etc.):
Public API usage
Artisan commands
Recognized environment variables
| Variable | Default | Purpose |
|---|---|---|
KRONN_API_KEY |
— | Required. Token generated inside Kronn. |
KRONN_ENABLED |
false |
Toggles collection on/off globally. |
KRONN_TRANSPORT |
log (will flip to http once HttpTransport ships) |
http (prod), log (dev), null (test). |
KRONN_INGEST_URL |
https://ingest.kronn.io/v1/ingest |
Endpoint override (internal dev/staging only). |
KRONN_ENV |
APP_ENV |
Environment label shown in Kronn. |
KRONN_SERVER |
gethostname() |
Host identifier. |
KRONN_DEPLOY |
(autodetect) | Current deploy hash/ID. |
KRONN_SAMPLE_REQUESTS |
1.0 |
Sampling rate for HTTP requests. |
KRONN_SAMPLE_COMMANDS |
1.0 |
Sampling rate for CLI commands. |
KRONN_SAMPLE_EXCEPTIONS |
1.0 |
Sampling rate for exceptions. |
KRONN_IGNORE_QUERIES |
false |
Skip query records. |
KRONN_IGNORE_CACHE_EVENTS |
false |
Skip cache event records. |
KRONN_IGNORE_OUTGOING_REQUESTS |
false |
Skip outgoing Guzzle request records. |
KRONN_IGNORE_MAIL |
false |
Skip mail records. |
KRONN_IGNORE_NOTIFICATIONS |
false |
Skip notification records. |
KRONN_CAPTURE_PAYLOAD |
false |
Capture HTTP request bodies (with redaction). |
KRONN_CAPTURE_EXCEPTION_SOURCE |
true |
Include ±5 lines of source around exceptions. |
KRONN_REDACT_PAYLOAD |
_token,password,... |
Payload keys to redact. |
KRONN_REDACT_HEADERS |
Authorization,Cookie,... |
Headers to redact. |
KRONN_BUFFER_CAPACITY |
500 |
Max records in the in-memory buffer. |
KRONN_HTTP_TIMEOUT |
2.0 |
HTTP transport timeout (seconds). |
KRONN_HTTP_RETRIES |
3 |
Retry attempts with exponential backoff. |
KRONN_HTTP_COMPRESS |
true |
Gzip the body before sending. |
KRONN_LONG_REQUEST_MS |
30000 |
Watchdog: force a digest if a request runs longer than this. |
KRONN_LONG_COMMAND_MS |
60000 |
Watchdog: force a digest if a CLI command runs longer than this. |
Architecture
See docs/BACKEND_ARCHITECTURE.md for the full platform design (SDK + ingest + storage + Kronn main app).
Acknowledgements
The architecture of this package — client/backend split, per-event sensors, producer-side sampling of records, trace id propagation via Context — is inspired by the excellent laravel/nightwatch (MIT, © Taylor Otwell). This project is, however, an independent implementation: its own schema, its own protocol, its own API.
License
MIT — see LICENSE.
All versions of observability with dependencies
ext-json Version *
ext-zlib Version *
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
monolog/monolog Version ^3.0
psr/log Version ^1.0|^2.0|^3.0
ramsey/uuid Version ^4.0