RoSentry Docs

SDK API Reference

Full method-level reference for the Roblox RoSentry SDK.

Initialization

RoSentry.init(options)
RoSentry.isInitialized()

init returns the RoSentry module instance.

Capture methods

RoSentry.captureException(err, options)
RoSentry.captureMessage(message, options)
RoSentry.debug(message, data)
RoSentry.info(message, data)
RoSentry.warn(message, data)
RoSentry.log(message, data)
RoSentry.wrap(fn)

wrap(fn) returns a protected function that captures thrown errors.

Scope and context methods

RoSentry.setUser(userId, playerName?, data?)
RoSentry.clearUser()
RoSentry.addBreadcrumb(category, message, data?)
RoSentry.setTag(key, value)
RoSentry.setExtra(key, value)
RoSentry.withScope(function(scope) ... end)

Queue and lifecycle

RoSentry.flush()
RoSentry.enable()
RoSentry.disable()
RoSentry.getStatus()

getStatus() returns:

{
    initialized = boolean,
    enabled = boolean,
    queueSize = number,
}

Queue deduplication

Repeated errors are deduplicated within the pending queue: an event with the same message, level, and stack_trace as a queued event increments that event's count instead of enqueuing a new one. The window is the un-flushed queue (bounded by flushInterval and maxQueueSize). Trace events and log messages without a stack trace are never deduplicated. This is always on and has no config option.

Transport behavior

  • Server sends HTTP payloads directly to ingest endpoint.
  • Client sends payloads via RemoteEvent (RoSentryRelay) to server.
  • Server injects relay context (playerName, playerId) for client-relayed events.

Event payload fields

Queued events include:

  • message, level, stack_trace
  • user_id, player_name
  • trace_id (if trace logging)
  • job_id, place_id, game_version
  • environment
  • context (userData/custom/breadcrumbs/script/trace)
  • tags
  • timestamp
  • count (occurrences merged by queue deduplication)

On this page