func newProxy(d *daemoncfg.DaemonEndpoints) (svcProxy, error) {
	if d == nil {
		d = daemoncfg.GetDaemonEndpoints()
	}
	logger.Infof("X-Ray proxy using address : %v", d.TCPAddr.String())
	url := "http://" + d.TCPAddr.String()
	f := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
		return endpoints.ResolvedEndpoint{
			URL: url,
		}, nil
	}
	sess, err := session.NewSession(&aws.Config{
		Region:           aws.String("us-west-1"),
		Credentials:      credentials.NewStaticCredentials("", "", ""),
		EndpointResolver: endpoints.ResolverFunc(f),
	})
	if err != nil {
		return nil, err
	}
	x := xraySvc.New(sess)
	x.Handlers.Sign.Clear()
	x.Handlers.Sign.PushBack(func(*request.Request) {
	})
	p := &proxy{xray: x}
	return p, nil
}
NewProxy returns a Proxy
package sampling
import (
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/credentials"
	"github.com/aws/aws-sdk-go/aws/endpoints"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/aws/session"
	xraySvc "github.com/aws/aws-sdk-go/service/xray"
	"github.com/aws/aws-xray-sdk-go/daemoncfg"
	"github.com/aws/aws-xray-sdk-go/internal/logger"
)
type proxy struct {
	xray *xraySvc.XRay
}