chore(sentry): tag dossier & procedure ids on dossier endpoints

This commit is contained in:
Colin Darie 2022-07-27 17:27:10 +02:00
parent 8b962b4624
commit 707ea37b33
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -389,7 +389,13 @@ module Users
end
def dossier
@dossier ||= dossier_scope.find(params[:id] || params[:dossier_id])
@dossier ||= dossier_scope.find(params[:id] || params[:dossier_id]).tap do |dossier|
# Ease search & groupments by tags
Sentry.configure_scope do |scope|
scope.set_tags(procedure: dossier.procedure.id)
scope.set_tags(dossier: dossier.id)
end
end
end
def dossier_with_champs