Skip to content

Commit

Permalink
fix: updates aws-xray-sdk-core to import xray client directly (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisradek authored and haotianw465 committed Nov 15, 2018
1 parent f662e21 commit dacf7b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/core/lib/middleware/sampling/service_connector.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var crypto = require('crypto');
var AWS = require('aws-sdk');
var AWS = require('aws-sdk/global');
var Xray = require('aws-sdk/clients/xray');
var logger = require('../../logger');
var SamplingRule = require('./sampling_rule');
var DaemonConfig = require('../../daemon_config')
Expand All @@ -16,7 +17,7 @@ var ServiceConnector = {
// identifying the SDK instance and is generated during SDK initialization/
// This is required when reporting sampling to X-Ray back-end.
clientId: crypto.randomBytes(12).toString('hex'),
client: new AWS.XRay({endpoint: util.format('http://%s:%d', DaemonConfig.tcp_ip, DaemonConfig.tcp_port)}),
client: new Xray({endpoint: util.format('http://%s:%d', DaemonConfig.tcp_ip, DaemonConfig.tcp_port)}),

fetchSamplingRules: function fetchSamplingRules(callback) {

Expand Down

0 comments on commit dacf7b2

Please sign in to comment.