Merge pull request #7655 from betagouv/sentry-tag-procedure-dossier

chore(sentry): tag dossier & procedure ids on dossier endpoints
This commit is contained in:
Colin Darie 2022-08-03 11:03:33 +02:00 committed by GitHub
commit c5fef621e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -389,7 +389,13 @@ module Users
end end
def dossier 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 end
def dossier_with_champs def dossier_with_champs