Tenant logs
Every field of a tenant log event, from its JSON Schema.
Each line in <paths.state_dir>/logs/<appId>.jsonl is one event. All events identify the app,
deployment and source, with a sequence number and the time the host observed them. The kind
field identifies output, cron output, a buffering gap or a tenant restart.
Logs and metrics covers retention and file rotation.
Schema: tenant-log.schema.json
TenantLogEvent
| Name | Type | Description |
|---|---|---|
appId | AppId | |
deploymentId | DeploymentId | |
sourceId | string | |
sequence | integer, at least 0 | |
observedAt | Timestamp |
One of the following, told apart by kind:
data
| Name | Type | Description |
|---|---|---|
kind | "data" | |
stream | TenantLogStream | |
text | string |
cron-data
| Name | Type | Description |
|---|---|---|
kind | "cron-data" | |
stream | TenantLogStream | |
text | string | |
jobId | string | |
runId | string |
gap
| Name | Type | Description |
|---|---|---|
kind | "gap" | |
droppedBytes | integer, at least 0 |
restart
| Name | Type | Description |
|---|---|---|
kind | "restart" |
AppId
an identifier
string, matching ^[A-Za-z0-9][A-Za-z0-9_-]{0,62}$
DeploymentId
an identifier
string, matching ^[A-Za-z0-9][A-Za-z0-9_-]{0,62}$
Timestamp
an ISO 8601 instant with an offset
string, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,9})?(Z|[+-][0-9]{2}:[0-9]{2})$
TenantLogStream
One of "stdout", "stderr".
TenantRestart
One restart of the tenant by the supervisor inside its guest, as the guest reported it. The host never sees the process, so this is the whole of what it knows about why the tenant went down and came back: which of the budget this restart was, how the tenant ended, the sentence the guest printed for it, and how long it waited before starting the tenant again.
| Name | Type | Description |
|---|---|---|
attempt | integer, at least 0 | 1 for the first restart since the tenant last stayed up long enough to earn its budget back, up to budget. |
budget | integer, at least 0 | |
exit | TenantExit | |
reason | StateMessage | |
backoffMs | integer, at least 0 |
TenantExit
How a tenant process ended: the code it exited with, or the signal that killed it.
One of the following:
code
| Name | Type | Description |
|---|---|---|
code | integer |
signal
| Name | Type | Description |
|---|---|---|
signal | integer |
StateMessage
string, at most 512 characters