Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[FIX] adding check for aws-sdk

  • Loading branch information...
commit a99a5a88a929b3841a4c4388e3860707388d90eb 1 parent 9c9ccd0
Tom Caspy authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/rpm_contrib/instrumentation/aws.rb
View
10 lib/rpm_contrib/instrumentation/aws.rb
@@ -13,8 +13,14 @@
executes do
# Instrument connections to the AWS-S3 service
- ::AWS::S3::Connection::Management::ClassMethods.module_eval do
- add_method_tracer :establish_connection!, 'AWS-S3/establish_connection!'
+ if defined?(::AWS::S3::Connection)
+ ::AWS::S3::Connection::Management::ClassMethods.module_eval do
+ add_method_tracer :establish_connection!, 'AWS-S3/establish_connection!'
+ end
+ else #using aws-sdk
+ ::AWS::S3.class_eval do
+ add_method_tracer :initialize, 'AWS-S3/establish_connection!'
+ end
end
# Instrument methods on Bucket
Please sign in to comment.
Something went wrong with that request. Please try again.