Module: MnUtilsLogging
- Defined in:
- lib/mn_utils_gem/site_action.rb
Overview
SiteAction class to log important site actions to Graylog and send a matching metric to Cloudwatch
usage: MnUtilsLogging::SiteAction.instance.log(message, site_action, optional_payload)
eg: MnUtilsLogging::SiteAction.instance.log(
"Login attempted with non-existent email",
:login_attempt_nonexistent_email,
{_email: "[email protected]", _request_ip: "123.123.123.123"}
)
This logs all the details in Graylog and records a count of 1
against a Cloudwatch metric called login_attempt_nonexistent_email in namespace mn/auth
The optional payload should be a simple flat hash with all keys starting with an underscore _ and all values being strings
Defined Under Namespace
Classes: SiteAction