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

Query traces

Returns the spans of a tenant’s calls over a span of time, oldest first. Every call is a span. Luna keeps the spans of calls that failed, were slow or were sampled. Name a trace to read one trace whole, however long ago it ran.

GET/_luna/telemetry/{tenant}/traces
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:traces:read
Path parameters
tenantstringrequired

The tenant, by its full name.

Query parameters
sinceinteger<int64>

Spans from this moment on, in milliseconds since the Unix epoch. One hour ago when left out, or any time when you name a trace.

min 0
untilinteger<int64>

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

min 0
tracestring

Only the spans of the trace with this id.

typestring

Only spans of this luna type.

handlerstring

Only spans of this handler.

errorsboolean

Only spans that failed.

minMsinteger<int64>

Only spans that took at least this long, in milliseconds.

min 0
limitinteger

How many spans to return. 200 when left out, 5000 at most.

min 0
Responses
200

The spans that match.

spansSpan[]required

The spans, oldest first.

Show properties
Array of Span
seqstringrequired

The span's number on the server that kept it, as text.

memberinteger<int64>required

The server that kept the span.

min 0
traceIdstringrequired
spanIdstringrequired
parentSpanIdstring | null

The span this one ran within. Left out for the first span of a trace.

namestringrequired
kindstringrequired

server, client, producer, consumer or internal.

startNsinteger<int64>required

When the span started, in nanoseconds since the Unix epoch.

min 0
endNsinteger<int64>required

When the span ended, in nanoseconds since the Unix epoch.

min 0
errorstring | null

What went wrong, for a span that failed.

attrsobject | null

The span's attributes.

eventsobject[] | null

Things that happened during the span, each with a name, a timeNs and its own attrs.

linksobject[] | null

Other spans this one relates to, each with a traceId and a spanId.

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/traces' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "spans": [
    {
      "seq": "string",
      "member": 0,
      "traceId": "string",
      "spanId": "string",
      "parentSpanId": "string",
      "name": "string",
      "kind": "string",
      "startNs": 0,
      "endNs": 0,
      "error": "string",
      "attrs": {},
      "events": [
        {}
      ],
      "links": [
        {}
      ]
    }
  ]
}

Was this page helpful?