Skip to content

Commit ecd501d

Browse files
authored
feat: add release metadata to sentry (#923)
1 parent 2433b0b commit ecd501d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

config/config.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ config :lambda_ethereum_consensus, ChainSpec,
3333
# Configure sentry logger handler
3434
# To enable sentry, set the SENTRY_DSN environment variable to the DSN of your sentry project
3535
config :sentry,
36-
dsn: System.get_env("SENTRY_DSN"),
3736
environment_name: Mix.env(),
3837
enable_source_code_context: true,
3938
root_source_code_paths: [File.cwd!()]

config/runtime.exs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,11 @@ case Keyword.get(args, :log_file) do
195195
timestamp_key: "ts",
196196
timestamp_format: :iso8601
197197
end
198+
199+
# Sentry
200+
201+
{git_sha, 0} = System.cmd("git", ["rev-parse", "--short", "HEAD"])
202+
203+
config :sentry,
204+
dsn: System.get_env("SENTRY_DSN"),
205+
release: String.trim(git_sha)

0 commit comments

Comments
 (0)