PHPackages                             kronn/observability - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. kronn/observability

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

kronn/observability
===================

Telemetria e APM da plataforma Kronn para aplicações Laravel.

v0.6.3(2w ago)3295↓100%MITPHPPHP ^8.2

Since May 20Pushed 2w agoCompare

[ Source](https://github.com/wallacemartinss/observability)[ Packagist](https://packagist.org/packages/kronn/observability)[ Docs](https://kronn.io)[ RSS](/packages/kronn-observability/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (9)Versions (11)Used By (0)

kronn/observability
===================

[](#kronnobservability)

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, set `KRONN_TRANSPORT=log` to inspect the records the SDK would emit, locally at `storage/logs/kronn.ndjson`.

Supported versions
------------------

[](#supported-versions)

- PHP **8.2+**
- Laravel **10.x / 11.x / 12.x / 13.x**

Installation
------------

[](#installation)

```
composer require kronn/observability
```

Configuration
-------------

[](#configuration)

### Production (target, once `HttpTransport` ships)

[](#production-target-once-httptransport-ships)

A single environment variable is all that's needed:

```
KRONN_API_KEY=kn_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
KRONN_TRANSPORT=http
```

> **Note for v0.1.0-dev:** `HttpTransport` is not implemented yet. Once it ships, the default of `KRONN_TRANSPORT` flips to `http` and the production `.env` reduces to just `KRONN_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)

[](#development-no-backend-running-yet)

To inspect the records the SDK *would* send without making any network calls:

```
KRONN_API_KEY=local-dev
KRONN_TRANSPORT=log
```

Records are written as NDJSON to `storage/logs/kronn.ndjson`, one per line, ready to inspect with `cat`/`jq`.

### Test environment

[](#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)

[](#endpoint-override-internal-devstaging-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.**

```
KRONN_INGEST_URL=http://localhost:8000/v1/ingest
```

### Publishing the config (optional)

[](#publishing-the-config-optional)

For customization beyond what env vars cover (filters, thresholds, etc.):

```
php artisan vendor:publish --tag=observability-config
```

Public API usage
----------------

[](#public-api-usage)

```
use Kronn\Observability\Facades\Telemetry;

Telemetry::user(fn ($user) => ['id' => $user->id, 'name' => $user->name]);
Telemetry::tag(['tenant' => 'acme', 'feature' => 'new-checkout']);
Telemetry::extra(['cart_size' => 12]);
Telemetry::report($exception); // manually report an exception
```

Artisan commands
----------------

[](#artisan-commands)

```
php artisan observability:status   # show config + run a transport probe
php artisan observability:sample   # emit synthetic records to validate the stack
```

Recognized environment variables
--------------------------------

[](#recognized-environment-variables)

VariableDefaultPurpose`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
------------

[](#architecture)

See `docs/BACKEND_ARCHITECTURE.md` for the full platform design (SDK + ingest + storage + Kronn main app).

Acknowledgements
----------------

[](#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
-------

[](#license)

MIT — see [`LICENSE`](./LICENSE).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

10

Last Release

19d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/56648941?v=4)[Wallace Martins da Silva](/maintainers/wallacemartinss)[@wallacemartinss](https://github.com/wallacemartinss)

---

Top Contributors

[![wallacemartinss](https://avatars.githubusercontent.com/u/56648941?v=4)](https://github.com/wallacemartinss "wallacemartinss (10 commits)")

---

Tags

laravelmonitoringapmtelemetryobservabilitykronn

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kronn-observability/health.svg)

```
[![Health](https://phpackages.com/badges/kronn-observability/health.svg)](https://phpackages.com/packages/kronn-observability)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[laravel/nightwatch

The official Laravel Nightwatch package.

3568.7M29](/packages/laravel-nightwatch)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M506](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
