Query logs
Returns a tenant’s log lines over a span of time, oldest first: the lines your code writes and the lines Luna writes about each call, wake and failure. When more lines match than limit, you get the newest ones.
/_luna/telemetry/{tenant}/logsAuthorizationBearer token · headerrequiredAn account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.
logs:readtenantstringrequiredThe tenant, by its full name.
sinceinteger<int64>Lines from this moment on, in milliseconds since the Unix epoch. One hour ago when left out.
untilinteger<int64>Lines up to this moment, in milliseconds since the Unix epoch. Now when left out.
typestringOnly lines of this luna type.
keystringOnly lines of the luna with this key: the whole key as JSON, or the value of one of its fields.
callstringOnly lines of the call with this id.
tracestringOnly lines of the trace with this id.
levelstringOnly lines at this level or above: debug, info, warn or error.
qstringOnly lines that contain this text.
sourcestringluna for the lines Luna writes about a luna, code for the lines your code writes.
eventstringOnly the lines Luna writes about these events, separated by commas, such as call,wake.
outcomestringOnly calls that ended this way: ok, error or timeout.
limitintegerHow many lines to return. 200 when left out, 5000 at most.
cursorstringThe cursor of the last answer. Only the tail reads it.
The lines that match.
logsLogLine[]requiredShow propertiesHide properties
LogLineseqstringrequiredThe line's number on the server that kept it, as text.
memberinteger<int64>requiredThe server that kept the line.
tsMsinteger<int64>requiredWhen the line was written, in milliseconds since the Unix epoch.
levelstringrequireddebug, info, warn or error.
bodystringrequiredThe text of the line.
lunaTypestring | nullThe luna type that wrote the line.
keystring | nullThe key of the luna that wrote the line, as JSON text.
handlerstring | nullThe handler that was running.
callIdstring | nullThe id of the call that was running.
traceIdstring | nullspanIdstring | nullversioninteger<int64> | nullThe version of the code that was running.
sourcestring | nullluna for a line Luna wrote about the luna. Left out for a line your code wrote.
eventstring | nullWhat a line of Luna's tells of, such as call or wake.
attrsobject | nullFurther fields of the line.
cursorstringrequiredWhere these lines end. Pass it to the tail as cursor to read what comes after.
The request failed. The status says how and error.message says why.
errorErrorDetailrequiredShow propertiesHide properties
codestring | nullA code for programs to branch on, when the error has one.
messagestringrequiredWhat went wrong, in a sentence a person can read.