Skip to content

Commit

Permalink
Configure deployment tracking for AppSignal (#3322)
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar authored Jul 17, 2023
1 parent 3beddf6 commit ce6f904
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ if config_env() == :prod do
# inspired from the installer and
# https://docs.appsignal.com/elixir/configuration.html

# revision tracking is helpful to track optimisations & regressions
{revision, exitcode} = System.cmd("git", ["log", "--pretty=format:%h", "-n 1"])
revision = if exitcode == 0, do: revision, else: nil

config :appsignal, :config,
# https://docs.appsignal.com/elixir/integrations/ecto.html
otp_app: :transport,
Expand All @@ -239,5 +243,6 @@ if config_env() == :prod do
name: System.get_env("CUSTOM_APPSIGNAL_APP_NAME", "transport.data.gouv.fr"),
push_api_key: System.get_env("CUSTOM_APPSIGNAL_PUSH_API_KEY"),
env: app_signal_env,
revision: revision,
active: true
end

0 comments on commit ce6f904

Please sign in to comment.