Skip to content

Commit

Permalink
Change group name to aws, update Capistrano configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bsp3ars authored and Thomas Scherz committed Feb 4, 2022
1 parent 067f912 commit 6c499fc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ group :production do
gem 'clamby'
end

group :xray do
group :aws do
# xray application monitoring through aws
gem 'aws-xray-sdk', require: ['aws-xray-sdk/facets/rails/railtie']
end
28 changes: 14 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,23 +154,23 @@ GEM
awesome_nested_set (3.4.0)
activerecord (>= 4.0.0, < 7.0)
aws-eventstream (1.2.0)
aws-partitions (1.551.0)
aws-sdk-core (3.125.6)
aws-partitions (1.552.0)
aws-sdk-core (3.126.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.53.0)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sdk-kms (1.54.0)
aws-sdk-core (~> 3, >= 3.126.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.111.3)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sdk-s3 (1.112.0)
aws-sdk-core (~> 3, >= 3.126.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-sdk-xray (1.4.0)
aws-sdk-core (~> 3)
aws-sigv4 (~> 1.0)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-xray-sdk (0.13.0)
aws-sdk-xray (~> 1.4.0)
Expand Down Expand Up @@ -237,9 +237,9 @@ GEM
sprockets (~> 3.7)
typhoeus
builder (3.2.4)
bundler-audit (0.7.0.1)
bundler-audit (0.9.0.1)
bundler (>= 1.2.0, < 3)
thor (>= 0.18, < 2)
thor (~> 1.0)
byebug (11.1.3)
cancancan (1.17.0)
capistrano (3.16.0)
Expand Down Expand Up @@ -771,10 +771,10 @@ GEM
pul_uv_rails (2.0.1)
puma (4.3.10)
nio4r (~> 2.0)
qa (5.7.0)
qa (5.8.0)
activerecord-import
deprecation
faraday
faraday (< 2.0)
geocoder
ldpath
nokogiri (~> 1.6)
Expand Down Expand Up @@ -883,7 +883,7 @@ GEM
rexml (~> 3.2)
redic (1.5.3)
hiredis
redis (4.1.4)
redis (4.5.1)
redis-namespace (1.8.1)
redis (>= 3.0.4)
redlock (1.2.2)
Expand Down Expand Up @@ -1006,11 +1006,11 @@ GEM
activesupport (>= 4.0.0)
show_me_the_cookies (5.0.1)
capybara (>= 2, < 4)
sidekiq (5.2.9)
sidekiq (5.2.10)
connection_pool (~> 2.2, >= 2.2.2)
rack (~> 2.0)
rack-protection (>= 1.5.0)
redis (>= 3.3.5, < 4.2)
redis (~> 4.5, < 4.6.0)
sidekiq-limit_fetch (3.4.0)
sidekiq (>= 4)
signet (0.12.0)
Expand Down
2 changes: 1 addition & 1 deletion config/deploy/curly.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

set :rails_env, :development
set :bundle_without, %w[production test].join(' ')
set :bundle_without, %w[production test aws].join(' ')
set :branch, 'sandbox'
set :default_env, path: "$PATH:/usr/sbin/"
set :bundle_path, -> { shared_path.join('vendor/bundle') }
Expand Down
2 changes: 1 addition & 1 deletion config/deploy/local.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true
set :rails_env, :development
set :bundle_without, %w[production test].join(' ')
set :bundle_without, %w[production test aws].join(' ')
set :branch, 'chore/#761-deployment-alternative'
set :default_env, path: "$PATH:/usr/local/bin"
append :linked_files, "db/development.sqlite3"
Expand Down
20 changes: 10 additions & 10 deletions config/initializers/aws_xray.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true
Rails.application.config.xray = {
name: "Scholar-#{Rails.env}@uc",
patch: %I[net_http aws_sdk],
# record db transactions as subsegments
active_record: true,
context_missing: 'LOG_ERROR',
# Makes sure the log file size does not go beyond a size, beyond which it is rotated.
# Only the latest rotated log will be retained. That is, the max possible size on disk of log files,
# if `SCHOLAR_XRAY_MAX_LOG_SIZE` is set to 10, would be 10MB(for the actual log) + 10MB(for the latest rotated log).
logger: Logger.new("log/#{Rails.env}-xray.log", 1, Integer(ENV.fetch("SCHOLAR_XRAY_MAX_LOG_SIZE", "10"), 10).megabytes)
}
name: "Scholar-#{Rails.env}@uc",
patch: %I[net_http aws_sdk],
# record db transactions as subsegments
active_record: true,
context_missing: 'LOG_ERROR',
# Makes sure the log file size does not go beyond a size, beyond which it is rotated.
# Only the latest rotated log will be retained. That is, the max possible size on disk of log files,
# if `SCHOLAR_XRAY_MAX_LOG_SIZE` is set to 10, would be 10MB(for the actual log) + 10MB(for the latest rotated log).
logger: Logger.new("log/#{Rails.env}-xray.log", 1, Integer(ENV.fetch("SCHOLAR_XRAY_MAX_LOG_SIZE", "10"), 10).megabytes)
}

0 comments on commit 6c499fc

Please sign in to comment.