diff --git a/Gemfile b/Gemfile index 387d5508..94d41e64 100644 --- a/Gemfile +++ b/Gemfile @@ -150,3 +150,5 @@ group :production do end gem 'concurrent-ruby', require: false + +gem "elastic-apm", "~> 3.10" diff --git a/Gemfile.lock b/Gemfile.lock index 5d095708..4d9d793c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -192,6 +192,9 @@ GEM dotenv-rails (2.7.2) dotenv (= 2.7.2) railties (>= 3.2, < 6.1) + elastic-apm (3.10.1) + concurrent-ruby (~> 1.0) + http (>= 3.0) elasticsearch (6.0.2) elasticsearch-api (= 6.0.2) elasticsearch-transport (= 6.0.2) @@ -682,6 +685,7 @@ DEPENDENCIES devise_pam_authenticatable2 (~> 9.2) doorkeeper (~> 5.1) dotenv-rails (~> 2.7) + elastic-apm (~> 3.10) fabrication (~> 2.20) faker (~> 1.9) fast_blank (~> 1.0) diff --git a/config/elastic_apm.yml b/config/elastic_apm.yml new file mode 100644 index 00000000..9c282b1e --- /dev/null +++ b/config/elastic_apm.yml @@ -0,0 +1,11 @@ +# config/elastic_apm.yml: + +# Set service name - allowed characters: a-z, A-Z, 0-9, -, _ and space +# Defaults to the name of your Rails app +service_name: <%= ENV['ES_APM_SERVICE_NAME'] %> + +# Use if APM Server requires a token +secret_token: <%= ENV['ES_APM_SECRET_TOKEN'] %> + +# Set custom APM Server URL (default: http://localhost:8200) +server_url: <%= ENV['ES_APM_URL'] %> \ No newline at end of file