-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log PA message create and update #570
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just one non-blocking question and a potential suggestion.
@@ -56,4 +58,17 @@ defmodule ScreenplayWeb.PaMessagesApiController do | |||
|> json(%{error: "not_found"}) | |||
end | |||
end | |||
|
|||
defp log_pa_message(event, message, conn) do | |||
Screenplay.Util.log(event, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it isn't called out in the task, but should we include alert_id
? Just want to mention it in case it was an oversight.
@@ -30,14 +30,16 @@ defmodule ScreenplayWeb.PaMessagesApiController do | |||
end | |||
|
|||
def create(conn, params) do | |||
with {:ok, _} <- PaMessages.create_message(params) do | |||
with {:ok, message} <- PaMessages.create_message(params) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it's worth it to log failures that make it to the FallbackController? We may not specifically know which even failed but would be notified when they happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, since those don't result in any actual changes, and it sounds like the purpose of this logging is to monitor operational changes being made.
Asana task: Add log entry to capture PA message create/update
This adds log entries for PA message create/update actions, as specified