at.happyproto.server.getScriptMetrics
How one of the caller's own instances' scripts ran in a window: every script that ran, or with trigger, one script's series. Customers only.
Details · query
| Kind | query |
|---|---|
| Authority | server.happyproto.at |
| Indexed |
Query
query · GETParameters
query stringThe instance's UUID.
step
stringWith trigger: how wide each point is. 1m and 30m suit 1h and 24h; 1h and 1d suit 7d and 30d. Defaults to the window's own.
knownValues: 1m | 30m | 1h | 1d
trigger
stringOne script's trigger, such as xrpc.query:com.example.getThing, at most 400 characters. With it, the reply is that script's series; without it, every script that ran.
window
stringHow far back to read. 1h and 24h come from the instance's memory; 7d and 30d from what it stored, as far back as it keeps.
default: "1h"knownValues: 1h | 24h | 7d | 30d
Output
application/jsonWhether the instance is recording metrics at all.
retentionDays
integerOn 7d and 30d: how many days the instance keeps, so a longer window covers only that.
script
refWith trigger: the script, over the whole window.
step
stringWith trigger: how wide each point is.
knownValues: 1m | 30m | 1h | 1d
knownValues: 1h | 24h | 7d | 30d
Errors
InvalidRequest
The id is not a UUID, or the window, step or trigger is not one this method takes.
NotFound
No such instance, or it is not the caller's. These are indistinguishable.
ScriptNotRun
With trigger: that script has not run in the window.
MetricsUnavailable
The instance is not running, or its host cannot be reached.
MetricsBusy
Too many metrics reads are running for this instance or its host. Try again shortly.
MetricsTimeout
The instance's HappyView did not answer in time. Try again shortly.
NotSupported
The instance runs a HappyView too old to report its metrics. Upgrading it fixes this.
AuthRequired
This endpoint requires an authenticated caller.
Forbidden
The caller is not a HappyProto customer, or the provisioner refused them.
InvalidSlug
Passed through from the provisioner.
SlugTaken
Passed through from the provisioner.
NotEntitled
Passed through from the provisioner.
InstanceLimit
Passed through from the provisioner.
NoCapacity
Passed through from the provisioner.
OperationInProgress
Passed through from the provisioner.
Upstream
The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.
#outcomes
objectHow the runs ended, by outcome. Every outcome is present, 0 when none ended that way.
Properties
#percentiles
objectDurations in whole microseconds. A value nothing measured is absent; a point carries only p50, p95 and max.
#point
object#script
objectProperties
What fired it, such as xrpc_query, record_event or job.
Where the script came from, such as project or dashboard.
memoryPeakBytes
integerThe most memory one run used. Absent when no run measured it.
Each run's wall time, start to finish.
#seriesScript
objectSimilar lexicons
semantic matchLexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
How any tenant's scripts ran in a window: every script that ran, or with trigger, one script's series. The same shape as server.getScriptMetrics. Admin only.
-
How one of the caller's own instances handled incoming records in a window, by collection and action. Customers only.
-
How any tenant handled incoming records in a window, by collection and action. The same shape as server.getIngestMetrics. Admin only.