RoSentry Docs

Tracing API Reference

Detailed reference for trace objects, limits, and state transitions.

Trace manager methods

RoSentry.startTrace(name, options)
RoSentry.getTrace(traceId)
RoSentry.endAllTraces(status?)
RoSentry.getActiveTraceCount()

Trace options

{
    maxEvents = number?,   -- default 100, hard max 500
    expiresIn = number?,   -- default 3600s, hard max 7200s
    tags = {string}?,
    metadata = { [string]: any }?,
}

Trace object API

trace.id
trace.name
trace:log(message, data?)
trace:debug(message, data?)
trace:info(message, data?)
trace:warn(message, data?)
trace:error(message, data?)
trace:isActive()
trace:finish(status?)

Status values

  • active
  • completed
  • error
  • timeout

Notes

  • A final trace:finish debug event is emitted when finishing.
  • If a trace exceeds maxEvents, it auto-finishes.
  • If a trace expires, it is marked timeout when evaluated.

On this page