Skip to content

Commit

Permalink
Add support for release and server_name
Browse files Browse the repository at this point in the history
  • Loading branch information
danifbento committed Apr 7, 2021
1 parent 7206ff7 commit 29ef9b6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions raven/senders/ngx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ end
-- @usage
-- local raven_ngx = require("raven.senders.ngx")
-- local rvn = raven.new(...)
-- rvn.get_quest_data = raven_ngx.get_request_data
-- rvn.get_request_data = raven_ngx.get_request_data
function _M.get_request_data()
local phase = ngx.get_phase()
-- the ngx.var.* API is not available in all contexts
Expand All @@ -262,10 +262,13 @@ function _M.get_request_data()
phase == "log"
then
return {
host = ngx.var.http_host or nil
caller = "nginx",
host = ngx.var.http_host or nil,
}
end
return {}
return {
caller = "nginx",
}
end

return _M

0 comments on commit 29ef9b6

Please sign in to comment.