A Lua interface to Sentry
Lua Makefile
Switch branches/tags
Nothing to show
Clone or download
jdesgats Moved a few methods to regular functons
These methods were not using the "self" argument and therefore had no
reason to be bound to a rvn instance. This might be useful to deal
efficiently with a lot of rvn objects.

Methods are sill available to keep compatibility.
Latest commit adc653e Apr 19, 2018



Build Status

A small Lua interface to Sentry that also has a helpful wrapper function call() that takes any arbitrary Lua function (with arguments) and executes it, traps any errors and reports it automatically to Sentry.


    local raven = require "raven"

    -- http://pub:secret@
    local rvn = raven.new {
        -- multiple senders are available for different networking backends,
        -- doing a custom one is also very easy.
        sender = require("raven.senders.luasocket").new {
            dsn = "http://pub:secret@",
        tags = { foo = "bar" },

    -- Send a message to sentry
    local id, err = rvn:captureMessage(
      "Sentry is a realtime event logging and aggregation platform.",
      { tags = { abc = "def" } } -- optional
    if not id then

    -- Send an exception to sentry
    local exception = {{
       ["type"]= "SyntaxError",
       ["value"]= "Wattttt!",
       ["module"]= "__builtins__"
    local id, err = rvn:captureException(
       { tags = { abc = "def" } } -- optional
    if not id then

    -- Catch an exception and send it to sentry
    function bad_func(n)
       return not_defined_func(n)

    -- variable 'ok' should be false, and an exception will be sent to sentry
    local ok = rvn:call(bad_func, 1)


See docs/index.html for more details.


To run the tests:

    luarocks install lunit
    luarocks install lua-cjson
    luarocks install luaposix
    luarocks install luasocket
    luarocks install luasec

    make test

To generate the docs:

    luarocks install ldoc

    make doc