-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As forms no longer have an `organisation_id` property, we are unable to use this property in Splunk searches to filter logs by the organisation the form is in. Add `form_organisation_id` field to log the organisation ID. Only log after we have looked up the `current_form` for the request to ensure that we aren't making a request to forms API to look up the form where we were not previously. We would expect all requests containing a `form_id` in the path params to lookup the form when authorizing the request. Logging this field will cause a database lookup to find the `group_form` and associated organisation_id.
- Loading branch information
1 parent
6f484eb
commit 194be1b
Showing
3 changed files
with
73 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class CurrentLoggingAttributes < ActiveSupport::CurrentAttributes | ||
attribute :host, :request_id, :session_id_hash, :trace_id, :user_ip, :user_id, :user_email, :user_organisation_slug, | ||
:form_id, :page_id | ||
:form_id, :form_organisation_id, :page_id | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters