Skip to content

Commit

Permalink
Merge pull request #100 from humanmade/check-for-xray-env
Browse files Browse the repository at this point in the history
Use env var to check if xray available
  • Loading branch information
joehoyle authored Oct 28, 2019
2 parents 1bf2029 + 8e05e53 commit 45306dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ var sharp = require('sharp'),
isAnimated = require('animated-gif-detector'),
smartcrop = require('smartcrop-sharp');

var AWS = AWSXRay.captureAWS(require('aws-sdk'));
let AWS;
if ( process.env.AWS_XRAY_DAEMON_ADDRESS ) {
AWS = AWSXRay.captureAWS(require('aws-sdk'));
} else {
AWS = require('aws-sdk');
}

var regions = {};

Expand Down

0 comments on commit 45306dc

Please sign in to comment.