Download the PHP package script-development/kendo-error-tracker without Composer

On this page you can find all versions of the php package script-development/kendo-error-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kendo-error-tracker

kendo-error-tracker

Packagist Version PHP Version CI

Canonical Laravel client library for reporting errors into kendo's error-tracking endpoint — scrubbing + auth + swallow-on-failure, installable via Composer across Script Development Laravel territories.

Why

kendo ships the server endpoint, but allied projects must not POST raw HTTP: PII scrubbing has to happen source-side and consistently. This library is the gate — install it, call ErrorTracker::report($exception) from your exception handler, and inherit scrubbing, Bearer auth, path normalization, and swallow-on-failure for free. Without it, every consuming project reinvents the wheel and the scrubbing contract drifts.

Installation

The ErrorTrackerServiceProvider is auto-discovered via Laravel package discovery — no manual registration. Publish the config if you want to tune it:

Configuration

Set the environment variables (the config reads ERROR_TRACKER_*). Only the first three are required — without them a report is silently dropped. Everything below them is optional and has a sane default.

Env var Config key Required? Description
ERROR_TRACKER_KENDO_URL kendo_url Required Base URL of your kendo tenant — always https://{tenant}.kendo.dev (e.g. https://script.kendo.dev).
ERROR_TRACKER_PROJECT project Required The kendo project id that owns the errors (the {project} route-key; kendo binds it by id).
ERROR_TRACKER_TOKEN token Required A kendo project token with the Read & write access level (Bearer). See Minting a project token.
ERROR_TRACKER_ENVIRONMENT environment Optional Deploy environment label. May be omitted — falls back to APP_ENV, then production. Only set it to override that derived default.
ERROR_TRACKER_RELEASE release Optional Release identifier (git sha / version tag). May be omitted — when unset it is dropped from the payload entirely.
ERROR_TRACKER_SYNC sync Optional false (default) queues the report; true POSTs inline. on, yes and 1 also POST inline; any other value, off and no included, queues.
ERROR_TRACKER_CONNECT_TIMEOUT connect_timeout Optional Seconds to wait while connecting to the kendo host (default 2). A value that is not above 0 and at most 30 falls back to the default.
ERROR_TRACKER_TIMEOUT timeout Optional Total seconds to wait for the POST (default 5); bounds the call so a hung host never blocks the caller. A value that is not above 0 and at most 30 falls back to the default.

Minimal working config — just the three required vars:

The optional knobs below are shown with their defaults; leave them commented out unless you need to override:

Minting a project token

The token is a kendo project token with the Read & write access level. Kendo replaced token abilities with access levels on 2026-10-05; the old error-events:write ability no longer exists.

  1. Sign in to kendo as a dedicated account made for this app, not as a person (see below).
  2. Open the project's Settings and go to API Tokens.
  3. Create a token, name it after the app, and choose the access Read & write. A Read token gets 403 on every write, error events included.
  4. Copy the token into ERROR_TRACKER_TOKEN. Kendo shows it only once.

Why a dedicated account. A project token acts as the account that created it, at its access level. A Read & write token can therefore do in the project whatever its creator may do there, reading reports, issues and error groups included, not only send error events. The token sits in the app's environment, so anyone who can read that environment gets that access. Make the creating account a member of this project only, with no more permission than creating error groups (Error Groups: Create). Kendo has no send-only access level yet (KD-1908). A token converted from the old error-events:write ability is Read & write too: replace it with one minted this way.

The token is bound to the project it was minted under. A token used against a different project's route is rejected by the server (403) — and like every failure, the client swallows it.

Integration

Report exceptions from your application's exception handler. In Laravel 11+ (bootstrap/app.php):

Or from a classic App\Exceptions\Handler::report():

That single call is the whole integration. report() is swallow-on-failure: it never throws and never blocks the request, so it is safe to call from inside your own exception handler.

What gets sent

report() builds and POSTs this body to {kendo_url}/api/projects/{project}/error-events:

A field the client cannot read is left out, and the rest of the report is still sent.

Affected users

user_hash lets kendo count how many different users an error hit, without sending who they are.

Multi-tenant apps

In an app with one database per tenant, user ids restart in each tenant, so user 42 of two tenants would give one hash. kendo would count them as one user and could link their reports. Register a resolver that returns the current tenant key, once, in a service provider's boot() (here with stancl/tenancy):

No other user data is added: not the user's name, not their email address, and no request body, header, cookie or URL. The exception's message and stack trace are sent as your code wrote them, after Scrubbing. Scrubbing catches an email address, but not a user id or a name: if your code puts one into an exception message, kendo receives it.

Scrubbing

Before send, the message, the stack trace, the location's file, the causes, the exception code, the runtime and framework versions, the context and the host are scrubbed of the following patterns (each replaced with a [REDACTED:<kind>] marker):

Pattern Example
JWT eyJhbGc... (three base64url segments)
Bearer token Bearer <credential>, including a Sanctum id\|secret token
Database DSN password mysql://user:pass@host — only the password is redacted
Query-string or name=value credential ?authKey=…, &key=…, DB_PASSWORD=…, oauth_token=… — only the value is redacted, as [REDACTED:secret]
API-key prefix sk_live_..., AKIA...
IPv4 address 192.168.1.42
BSN (Dutch citizen service number) a 9-digit run passing the eleven-test (Dutch: elfproef) checksum
Email address [email protected]

BSN candidates are checksum-validated (the eleven-test) before redaction, so an arbitrary 9+-digit ID (an order number, invoice ID, or timestamp) is not falsely redacted, and a real BSN embedded in a longer digit run (e.g. a phone number) is still caught.

A query-string credential is redacted when the parameter name ends in password, passwd, pwd, secret, token, api_key, apikey, auth_key, authkey, private_key or signature (any case, with - or _ or no separator inside the name, and any prefix), or when it is a bare key parameter after ?, & or ;. The value runs to the next &, whitespace, # or quote. Prose such as foreign key= or Undefined array key= is left alone.

Free-text PII that isn't a fixed secret shape — a name, address, or care-data value embedded in a database error message — is not covered by pattern matching. QueryException and PDOException are instead handled by a per-exception-type carrier-strip: the message is replaced with just the exception class, SQLSTATE, and driver error code, dropping the SQL string and bound parameter values entirely.

The stack trace carries each frame's file, line, class and function, and no argument values, whatever zend.exception_ignore_args is set to. An include or require frame is sent without its file name.

Not scrubbed

Path normalization

Each stack frame's absolute path, and every absolute path in the message, has the app's own base_path() stripped (an exact prefix removal, mirroring laravel/nightwatch's Location::normalizeFile()). The same exception thrown from /var/www/html/app/Foo.php and /home/forge/app/Foo.php normalizes to the identical app/Foo.php, so kendo fingerprints it once regardless of deploy root.

An anonymous exception class is named after the file that declares it (Parent@anonymous\0/abs/path/Foo.php:LINE$N). exception_class drops the $N compile counter and strips base_path() from that file; any other declaration file (outside base_path() — vendor code on a shared mount, a symlinked release directory — or a stream-wrapper URI such as phar://) is reduced to its basename, Parent@anonymous\0[REDACTED:path]/Foo.php:LINE. Two anonymous classes with the same file name and line outside the app root therefore share a fingerprint. Stack frames outside base_path() are not reduced this way: they keep their absolute path, with only the /home/<user>/ and /Users/<user>/ username redacted.

Dispatch modes

Both modes swallow every failure.

Failure handling

A 202 response is success. Every failure — HTTP timeout, 401 (missing, invalid, revoked or expired token), 403 (a Read token, a token linked to another project, or the Error Tracking feature switched off), 422 (a field kendo refuses), 429 (rate limit), 5xx, or an unreachable host — is written to the local error_log and never thrown.

Public API

These classes and methods are the public API, marked @api in the source. Within a 0.x minor they keep their signatures, so a patch release does not break code that uses them:

What Scrubber and PathNormalizer redact may widen in a patch release: a new pattern is a fix. Everything else is internal, marked @internal, and may change in any release: ErrorTracker's constructor and send(), PathNormalizer::relativize(), RunningContext, MemoryLimit and ErrorTrackerServiceProvider. tests/Unit/PublicApiTest.php pins the public signatures.

Development


All versions of kendo-error-tracker with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/contracts Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/bus Version ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/queue Version ^11.0 || ^12.0 || ^13.0
illuminate/routing Version ^11.0 || ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package script-development/kendo-error-tracker contains the following files

Loading the files please wait ...