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 6022ab6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 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
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ GEM
aws-sdk-core (~> 3, >= 3.125.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-sdk-xray (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
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
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 6022ab6

Please sign in to comment.