diff --git a/config/config.exs b/config/config.exs index ab2d0f592..1e96f64ee 100644 --- a/config/config.exs +++ b/config/config.exs @@ -33,7 +33,6 @@ config :lambda_ethereum_consensus, ChainSpec, # Configure sentry logger handler # To enable sentry, set the SENTRY_DSN environment variable to the DSN of your sentry project config :sentry, - dsn: System.get_env("SENTRY_DSN"), environment_name: Mix.env(), enable_source_code_context: true, root_source_code_paths: [File.cwd!()] diff --git a/config/runtime.exs b/config/runtime.exs index 5b801a791..2d5f19c3d 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -195,3 +195,11 @@ case Keyword.get(args, :log_file) do timestamp_key: "ts", timestamp_format: :iso8601 end + +# Sentry + +{git_sha, 0} = System.cmd("git", ["rev-parse", "--short", "HEAD"]) + +config :sentry, + dsn: System.get_env("SENTRY_DSN"), + release: String.trim(git_sha)