Alright, I’ve got a weird one… I realize this isn’t a ton to go on, but I think I’ve just been spinning my wheels for a bit.
I am working on an integration to a Lua/OpenResty (Nginx) application. I’ve been using Cloudflare’s raven-lua package.
I’ve hooked everything up, and after running my application, I triggered an error (just calling an undefined function). In my app, while testing, I called captureMessage
and captureException
. Both events arrive once. Then never again…
I’m using a self-hosted Sentry, so I thought maybe that was it… but then I tried with the free hosted version and both exhibit the same behavior.
So, what should I try? Naturally I’ve rebooted the app and I can see the event being sent to Sentry.
- Here’s an open issue with raven-lua: https://github.com/cloudflare/raven-lua/issues/38
- An example event just sent but not visible in the app:
{
"culprit": "handle_error",
"event_id": "cb511a8b2e7fec971109ec0d397314ba",
"exception": [
{
"message": "Test",
"module": "test module",
"stacktrace": {
"frames": [
{
"filename": "content_by_lua(locations.conf:23)",
"lineno": 2
},
{
"filename": "...el/Users/michael/.luarocks/share/lua/5.1/lapis/nginx.lua",
"function": "serve",
"lineno": 230
},
{
"filename": "...rs/michael/.luarocks/share/lua/5.1/lapis/application.lua",
"function": "dispatch",
"lineno": 177
},
{
"filename": "...rs/michael/.luarocks/share/lua/5.1/lapis/application.lua",
"function": "render_error_request",
"lineno": 141
},
{
"filename": "./app.lua",
"function": "handle_error",
"lineno": 226
}
]
},
"type": "Test Type 2",
"value": "...rs/michael/.luarocks/share/lua/5.1/lapis/application.lua:401: ./controllers/project.lua:95: attempt to call global 'xyz' (a nil value)\nstack traceback:\n\t./controllers/project.lua: in function <./controllers/project.lua:87>1"
}
],
"level": "error",
"logger": "root",
"message": "...rs/michael/.luarocks/share/lua/5.1/lapis/application.lua:401: ./controllers/project.lua:95: attempt to call global 'xyz' (a nil value)\nstack traceback:\n\t./controllers/project.lua: in function <./controllers/project.lua:87>1",
"platform": "lua",
"server_name": "undefined",
"timestamp": "2020-10-31T08:45:38"
}
I super appreciate any help! This has stumped me for a while.