feat(graphql): log dossier and procedure id on dossier fetch endoint

This commit is contained in:
Paul Chavard 2023-04-19 18:00:08 +02:00
parent 9728493bda
commit 63b7a83689
2 changed files with 9 additions and 0 deletions

View file

@ -14,6 +14,13 @@ class API::V2::DossiersController < API::V2::BaseController
private
def append_info_to_payload(payload)
super
if dossier.present?
payload.merge!(ds_dossier_id: dossier.id.to_s, ds_procedure_id: dossier.procedure.id.to_s)
end
end
def ensure_dossier_present
if dossier.blank?
head :unauthorized

View file

@ -18,6 +18,8 @@ Rails.application.configure do
graphql_variables: event.payload[:graphql_variables],
graphql_null_error: event.payload[:graphql_null_error],
graphql_timeout_error: event.payload[:graphql_timeout_error],
ds_procedure_id: event.payload[:ds_procedure_id],
ds_dossier_id: event.payload[:ds_dossier_id],
browser: event.payload[:browser],
browser_version: event.payload[:browser_version],
platform: event.payload[:platform],