Skip to content

Commit 95438d0

Browse files
authored
Merge pull request #4 from script-development/KD-0884-readme-optional-knobs
KD-0884: Clarify optional config knobs in kendo-error-tracker README
2 parents a685f21 + f274421 commit 95438d0

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,35 @@ php artisan vendor:publish --tag=error-tracker-config
2525

2626
## Configuration
2727

28-
Set the environment variables (the config reads `ERROR_TRACKER_*`):
29-
30-
| Env var | Config key | Description |
31-
|---|---|---|
32-
| `ERROR_TRACKER_KENDO_URL` | `kendo_url` | Base URL of your kendo tenant — always `https://{tenant}.kendo.dev` (e.g. `https://script.kendo.dev`). |
33-
| `ERROR_TRACKER_PROJECT` | `project` | The kendo **project id** that owns the errors (the `{project}` route-key; kendo binds it by id). |
34-
| `ERROR_TRACKER_TOKEN` | `token` | A kendo project token carrying the `error-events:write` ability (Bearer). |
35-
| `ERROR_TRACKER_ENVIRONMENT` | `environment` | Deploy environment label (defaults to `APP_ENV`). |
36-
| `ERROR_TRACKER_RELEASE` | `release` | Optional release identifier (git sha / version tag). |
37-
| `ERROR_TRACKER_SYNC` | `sync` | `false` (default) queues the report; `true` POSTs inline. |
38-
| `ERROR_TRACKER_CONNECT_TIMEOUT` | `connect_timeout` | Seconds to wait while connecting to the kendo host (default `2`). |
39-
| `ERROR_TRACKER_TIMEOUT` | `timeout` | Total seconds to wait for the POST (default `5`); bounds the call so a hung host never blocks the caller. |
28+
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.
29+
30+
| Env var | Config key | Required? | Description |
31+
|---|---|---|---|
32+
| `ERROR_TRACKER_KENDO_URL` | `kendo_url` | **Required** | Base URL of your kendo tenant — always `https://{tenant}.kendo.dev` (e.g. `https://script.kendo.dev`). |
33+
| `ERROR_TRACKER_PROJECT` | `project` | **Required** | The kendo **project id** that owns the errors (the `{project}` route-key; kendo binds it by id). |
34+
| `ERROR_TRACKER_TOKEN` | `token` | **Required** | A kendo project token carrying the `error-events:write` ability (Bearer). |
35+
| `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. |
36+
| `ERROR_TRACKER_RELEASE` | `release` | Optional | Release identifier (git sha / version tag). May be omitted — when unset it is dropped from the payload entirely. |
37+
| `ERROR_TRACKER_SYNC` | `sync` | Optional | `false` (default) queues the report; `true` POSTs inline. |
38+
| `ERROR_TRACKER_CONNECT_TIMEOUT` | `connect_timeout` | Optional | Seconds to wait while connecting to the kendo host (default `2`). |
39+
| `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. |
40+
41+
Minimal working config — just the three required vars:
4042

4143
```dotenv
4244
ERROR_TRACKER_KENDO_URL=https://script.kendo.dev
4345
ERROR_TRACKER_PROJECT=7
4446
ERROR_TRACKER_TOKEN=your-project-token
45-
ERROR_TRACKER_ENVIRONMENT=production
46-
ERROR_TRACKER_RELEASE=v1.2.3
47+
```
48+
49+
The optional knobs below are shown with their defaults; leave them commented out unless you need to override:
50+
51+
```dotenv
52+
# ERROR_TRACKER_ENVIRONMENT= # defaults to APP_ENV, then "production"
53+
# ERROR_TRACKER_RELEASE= # omitted from the payload when unset (e.g. v1.2.3)
54+
# ERROR_TRACKER_SYNC=false # true POSTs inline instead of queueing
55+
# ERROR_TRACKER_CONNECT_TIMEOUT=2 # seconds to wait while connecting
56+
# ERROR_TRACKER_TIMEOUT=5 # total seconds to wait for the POST
4757
```
4858

4959
## Minting a project token
@@ -98,7 +108,7 @@ That single call is the whole integration. `report()` is **swallow-on-failure**:
98108
}
99109
```
100110

101-
`release` is omitted when unset. No request, user, or context fields are sent — the server schema bans them.
111+
`environment` reflects the resolved value (your `ERROR_TRACKER_ENVIRONMENT`, else `APP_ENV`, else `production`); `release` is omitted from the body entirely when unset. No request, user, or context fields are sent — the server schema bans them.
102112

103113
## Scrubbing
104114

0 commit comments

Comments
 (0)