From 9842843dc8ff5e042e23491e9031c1b968564e48 Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Thu, 5 Sep 2024 12:59:43 -0400 Subject: [PATCH] feat: have Sentry report code context --- config/config.exs | 4 +++- deploy/dotcom/prod/Dockerfile | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/config.exs b/config/config.exs index 5f65cabcdf..f25f11e873 100644 --- a/config/config.exs +++ b/config/config.exs @@ -30,7 +30,9 @@ config :dotcom, :otp_module, OpenTripPlannerClient config :dotcom, :req_module, Req config :sentry, - json_library: Poison + enable_source_code_context: true, + root_source_code_paths: [File.cwd!()], + context_lines: 5 for config_file <- Path.wildcard("config/{deps,dotcom}/*.exs") do import_config("../#{config_file}") diff --git a/deploy/dotcom/prod/Dockerfile b/deploy/dotcom/prod/Dockerfile index 4844a8f3b2..a56300be45 100644 --- a/deploy/dotcom/prod/Dockerfile +++ b/deploy/dotcom/prod/Dockerfile @@ -60,6 +60,7 @@ RUN mix sentry.package_source_code # re-compile the application after the assets are copied, since some of them # are built into the application (SVG icons) RUN mix do compile, phx.digest +RUN mix sentry.package_source_code RUN mix release # 4) Use the nodejs container for the runtime environment