Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Query metrics

Returns a tenant’s metrics over a span of time: calls, errors and latency, wakes, connections and usage, for each luna type and for all of them together, with a point for each minute.

GET/_luna/telemetry/{tenant}/metrics
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:metrics:read
Path parameters
tenantstringrequired

The tenant, by its full name.

Query parameters
sinceinteger<int64>

Metrics from this moment on, in milliseconds since the Unix epoch. One hour ago when left out.

min 0
untilinteger<int64>

Metrics up to this moment, in milliseconds since the Unix epoch. Now when left out.

min 0
typestring

Only this luna type. The answer then also has each handler's figures by the minute.

Responses
200

The metrics.

typesTypeMetricsSummary[]required

The figures of each luna type.

Show properties
Array of TypeMetricsSummary
lunaTypestringrequired
callsinteger<int64>required

How many calls were handled.

min 0
errorsinteger<int64>required

How many of them failed.

min 0
p50Usinteger<int64>required

The median time a call took, in microseconds.

min 0
p99Usinteger<int64>required

The time 99 calls in 100 finished within, in microseconds.

min 0
wakesinteger<int64>required

How many times a luna woke.

min 0
wakeP99Usinteger<int64>required

The time 99 wakes in 100 finished within, in microseconds.

min 0
deadLettersinteger<int64>required

Messages given up on after every retry.

min 0
connectsinteger<int64>required

Client connections opened.

min 0
disconnectsinteger<int64>required

Client connections closed.

min 0
activeMsinteger<int64>required

The time lunas spent handling calls, in milliseconds.

min 0
usageobjectrequired

What the type used over the span, by meter. Meters at zero are left out.

handlersobjectrequired

Each handler's calls, errors, p50Us and p99Us, by handler name.

seriesobject[]required

One point for each minute, as in all.

hotobject[]required

The busiest lunas of the type, each with its key, calls, busyUs and errors.

customobject[]required

The metrics your code records, each with its name, kind, unit, attrs, count, sum, min, max and last.

customDroppedinteger<int64>required

How many of your metrics were dropped for being over the limit.

min 0
handlerSeriesobject | null

Each handler's points for each minute, by handler name. Only when the request names one type.

behindMsinteger<int64> | null

How far behind their sources an index's lunas ran on average, in milliseconds. Only for a type that ran behind.

min 0
behindMaxMsinteger<int64> | null

How far behind they ran at worst, in milliseconds.

min 0
allAllMetricsSummaryrequired

The figures of every luna type together.

Show properties
callsinteger<int64>required

How many calls were handled.

min 0
errorsinteger<int64>required

How many of them failed.

min 0
p50Usinteger<int64>required

The median time a call took, in microseconds.

min 0
p99Usinteger<int64>required

The time 99 calls in 100 finished within, in microseconds.

min 0
wakesinteger<int64>required

How many times a luna woke.

min 0
wakeP99Usinteger<int64>required

The time 99 wakes in 100 finished within, in microseconds.

min 0
deadLettersinteger<int64>required

Messages given up on after every retry.

min 0
connectsinteger<int64>required

Client connections opened.

min 0
disconnectsinteger<int64>required

Client connections closed.

min 0
activeMsinteger<int64>required

The time lunas spent handling calls, in milliseconds.

min 0
usageobjectrequired

What was used over the span, by meter, such as lunaCpuMs and egressBytes. Meters at zero are left out.

seriesobject[]required

One point for each minute, with minuteMs, calls, errors, p50Us, p99Us, awake and activeMs. The rarer figures appear only in the minutes that had any.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://luna.example.com/_luna/telemetry/string/metrics' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "types": [
    {
      "lunaType": "string",
      "calls": 0,
      "errors": 0,
      "p50Us": 0,
      "p99Us": 0,
      "wakes": 0,
      "wakeP99Us": 0,
      "deadLetters": 0,
      "connects": 0,
      "disconnects": 0,
      "activeMs": 0,
      "usage": {},
      "handlers": {},
      "series": [
        {}
      ],
      "hot": [
        {}
      ],
      "custom": [
        {}
      ],
      "customDropped": 0,
      "handlerSeries": {},
      "behindMs": 0,
      "behindMaxMs": 0
    }
  ],
  "all": {
    "calls": 0,
    "errors": 0,
    "p50Us": 0,
    "p99Us": 0,
    "wakes": 0,
    "wakeP99Us": 0,
    "deadLetters": 0,
    "connects": 0,
    "disconnects": 0,
    "activeMs": 0,
    "usage": {},
    "series": [
      {}
    ]
  }
}

Was this page helpful?