Skip to content

Commit

Permalink
Do not patch aws_sdk by default
Browse files Browse the repository at this point in the history
  • Loading branch information
barrucadu committed Oct 3, 2018
1 parent 55211b1 commit a27d557
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/govuk_app_config/govuk_xray.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ def self.initialize(app)
end

def self.start
# if aws-sdk is loaded, we want to instrument that too
patch = Gem.loaded_specs.has_key?('aws-sdk-core') ?
%I[aws_sdk net_http] : %I[net_http]
# patching 'aws_sdk' seem to impose a large memory overhead, so
# don't do that by default
patch = ENV.has_key?('XRAY_PATCH_AWS_SDK') ?
%I[aws_sdk net_http] : %I[net_http]

# if there isn't a name set, attempting to record a segment will
# throw an error
Expand Down

0 comments on commit a27d557

Please sign in to comment.