From 7918108238c7b8d1048fe23da05ca7f6f5f218c6 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 25 Feb 2021 20:18:34 -0800 Subject: [PATCH] Add function for a release field --- raven/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/raven/init.lua b/raven/init.lua index 1051a60..5426a6a 100644 --- a/raven/init.lua +++ b/raven/init.lua @@ -159,6 +159,12 @@ function _M.get_request_data() return {} end +--- This method can be used to tag a release in Sentry. +-- Typically you can use it with a commit hash. +function _M.get_release() + return '' +end + --- This table can be used to tune the message reporting. -- @field tags Tags for the message, they will be coalesced with the ones -- provided in the @{sentry_conf} table used in the constructor if any. In @@ -334,6 +340,7 @@ function raven_mt:send_report(json, conf) json.request = _M.get_request_data() json.server_name = _M.get_server_name() + json.releae = _M.get_release() local json_str = json_encode(json) local ok, err = self.sender:send(json_str)