RoSentry Docs

Configuration

SDK options, defaults, and tuning guidance for production.

Config options

RoSentry.init(options) supports:

OptionTypeDefaultNotes
apiKeystring""Required on server, optional on client
environmentstring"production"Use stable environment names
endpointstring"https://rosentry.vercel.app/api/ingest"Override for custom deployments
enabledbooleantrueHard on/off switch
sampleRatenumber1.0Fraction of events kept (0.0 to 1.0)
maxBreadcrumbsnumber100In-memory breadcrumb cap
maxQueueSizenumber50Batch trigger threshold
flushIntervalnumber5Seconds between queue flushes
debugbooleanfalsePrints SDK internals
autoCapturebooleantrueUses ScriptContext.Error capture
captureWarningsbooleanfalseCaptures warning log messages
beforeSendfunctionnilMutate/drop event before queueing

Example

RoSentry.init({
    apiKey = "rs_your_api_key_here",
    environment = "production",
    sampleRate = 0.5,
    maxQueueSize = 25,
    flushInterval = 3,
    autoCapture = true,
    captureWarnings = false,
    beforeSend = function(event)
        -- Example scrub
        if event.context and event.context.custom then
            event.context.custom.secret = nil
        end
        return event
    end,
})

Tuning guidance

  • High traffic games: reduce sampleRate first, then maxQueueSize
  • Debug sessions: enable debug and temporarily set sampleRate = 1.0
  • Sensitive environments: use beforeSend to strip secrets and large payloads

On this page