at.happyproto.fleet.getTenantScriptMetrics
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.
Details · query
| Kind | query |
|---|---|
| Authority | fleet.happyproto.at |
| Indexed |
Checks
Validunlimited-stringdefs.main.parameters.properties.stepNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.tenantNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.triggerNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.windowNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.stepNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.windowNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "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.",
"errors": [
{
"description": "The tenant id is not a UUID, or the window, step or trigger is not one this method takes.",
"name": "InvalidRequest"
},
{
"description": "No such tenant.",
"name": "NotFound"
},
{
"description": "With trigger: that script has not run in the window.",
"name": "ScriptNotRun"
},
{
"description": "The instance is not running, or its host cannot be reached.",
"name": "MetricsUnavailable"
},
{
"description": "Too many metrics reads are running for this instance or its host. Try again shortly.",
"name": "MetricsBusy"
},
{
"description": "The instance's HappyView did not answer in time. Try again shortly.",
"name": "MetricsTimeout"
},
{
"description": "The instance runs a HappyView too old to report its metrics. Upgrading it fixes this.",
"name": "NotSupported"
},
{
"description": "This endpoint requires an authenticated caller.",
"name": "AuthRequired"
},
{
"description": "The caller is not HappyProto staff, or the provisioner does not treat them as staff.",
"name": "Forbidden"
},
{
"description": "Passed through from the provisioner.",
"name": "InvalidSlug"
},
{
"description": "Passed through from the provisioner.",
"name": "SlugTaken"
},
{
"description": "Passed through from the provisioner.",
"name": "NotEntitled"
},
{
"description": "Passed through from the provisioner.",
"name": "InstanceLimit"
},
{
"description": "Passed through from the provisioner.",
"name": "NoCapacity"
},
{
"description": "Passed through from the provisioner.",
"name": "OperationInProgress"
},
{
"description": "The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.",
"name": "Upstream"
}
],
"output": {
"encoding": "application/json",
"schema": {
"description": "Without trigger, window, enabled and scripts. With it, window, step, enabled, script and points.",
"properties": {
"enabled": {
"description": "Whether the instance is recording metrics at all.",
"type": "boolean"
},
"points": {
"description": "With trigger: the window in steps, oldest first.",
"items": {
"ref": "at.happyproto.server.getScriptMetrics#point",
"type": "ref"
},
"type": "array"
},
"retentionDays": {
"description": "On 7d and 30d: how many days the instance keeps, so a longer window covers only that.",
"type": "integer"
},
"script": {
"description": "With trigger: the script, over the whole window.",
"ref": "at.happyproto.server.getScriptMetrics#seriesScript",
"type": "ref"
},
"scripts": {
"description": "Without trigger: every script that ran in the window.",
"items": {
"ref": "at.happyproto.server.getScriptMetrics#script",
"type": "ref"
},
"type": "array"
},
"step": {
"description": "With trigger: how wide each point is.",
"knownValues": [
"1m",
"30m",
"1h",
"1d"
],
"type": "string"
},
"window": {
"knownValues": [
"1h",
"24h",
"7d",
"30d"
],
"type": "string"
}
},
"required": [
"window",
"enabled"
],
"type": "object"
}
},
"parameters": {
"properties": {
"step": {
"description": "With 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"
],
"type": "string"
},
"tenant": {
"description": "The instance id.",
"type": "string"
},
"trigger": {
"description": "One 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.",
"type": "string"
},
"window": {
"default": "1h",
"description": "How 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.",
"knownValues": [
"1h",
"24h",
"7d",
"30d"
],
"type": "string"
}
},
"required": [
"tenant"
],
"type": "params"
},
"type": "query"
}
},
"id": "at.happyproto.fleet.getTenantScriptMetrics",
"lexicon": 1
}