在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):cloudflare/raven-lua开源软件地址(OpenSource Url):https://github.com/cloudflare/raven-lua开源编程语言(OpenSource Language):Lua 99.1%开源软件介绍(OpenSource Introduction):raven-luaA small Lua interface to Sentry that also
has a helpful wrapper function Synopsis local raven = require "raven"
-- http://pub:[email protected]:8080/sentry/proj-id
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:[email protected]:8080/sentry/proj-id",
},
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
print(err)
end
-- Send an exception to sentry
local exception = {{
["type"]= "SyntaxError",
["value"]= "Wattttt!",
["module"]= "__builtins__"
}}
local id, err = rvn:captureException(
exception,
{ tags = { abc = "def" } } -- optional
)
if not id then
print(err)
end
-- Catch an exception and send it to sentry
function bad_func(n)
return not_defined_func(n)
end
-- variable 'ok' should be false, and an exception will be sent to sentry
local ok = rvn:call(bad_func, 1)
DocumentationSee docs/index.html for more details. PrerequisitesTo run the tests:
To generate the docs:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论