From a71e8d9a8115b4af97342d2a22d395c5312b6f1d Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Mon, 20 Feb 2023 09:36:27 +0100 Subject: [PATCH] chore(bundle): setup elastic_apm, disabled by default --- Gemfile | 1 + Gemfile.lock | 17 +++++++++++++++++ config/elastic_apm.yml | 8 ++++++++ 3 files changed, 26 insertions(+) create mode 100644 config/elastic_apm.yml diff --git a/Gemfile b/Gemfile index 708603839..3fcb4c749 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,7 @@ gem 'devise-i18n' gem 'devise-two-factor' gem 'discard' gem 'dotenv-rails', require: 'dotenv/rails-now' # dotenv should always be loaded before rails +gem 'elastic-apm' gem 'flipper' gem 'flipper-active_record' gem 'flipper-ui' diff --git a/Gemfile.lock b/Gemfile.lock index 14db486bd..02f1dc484 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -220,6 +220,10 @@ GEM dumb_delegator (1.0.0) ecma-re-validator (0.3.0) regexp_parser (~> 2.0) + elastic-apm (4.6.0) + concurrent-ruby (~> 1.0) + http (>= 3.0) + ruby2_keywords encryptor (3.0.0) erubi (1.12.0) et-orbi (1.2.4) @@ -249,6 +253,9 @@ GEM faraday-patron (1.0.0) faraday-rack (1.0.0) ffi (1.15.5) + ffi-compiler (1.0.1) + ffi (>= 1.0.0) + rake flipper (0.26.0) concurrent-ruby (< 2) flipper-active_record (0.26.0) @@ -323,9 +330,15 @@ GEM highline (2.0.3) html_tokenizer (0.0.7) htmlentities (4.3.4) + http (5.1.1) + addressable (~> 2.8) + http-cookie (~> 1.0) + http-form_data (~> 2.2) + llhttp-ffi (~> 0.4.0) http-accept (1.7.0) http-cookie (1.0.3) domain_name (~> 0.5) + http-form_data (2.3.0) http_accept_language (2.1.1) httpclient (2.8.3) i18n (1.12.0) @@ -390,6 +403,9 @@ GEM listen (3.4.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + llhttp-ffi (0.4.0) + ffi-compiler (~> 1.0) + rake (~> 13.0) lograge (0.11.2) actionpack (>= 4) activesupport (>= 4) @@ -838,6 +854,7 @@ DEPENDENCIES devise-two-factor discard dotenv-rails + elastic-apm factory_bot flipper flipper-active_record diff --git a/config/elastic_apm.yml b/config/elastic_apm.yml new file mode 100644 index 000000000..2c65bac6b --- /dev/null +++ b/config/elastic_apm.yml @@ -0,0 +1,8 @@ +# Set options ELASTIC_APM_SERVER_URL & ELASTIC_APM_SECRET_TOKEN by env vars instead +# See https://www.elastic.co/guide/en/apm/agent/ruby/current/configuration.html +# +# server_url: '' +# secret_token: '' + +# Enable it with ELASTIC_APM_ENABLED="true" +enabled: false