Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (7 sloc) 591 Bytes

Tracing Calls to Downstream HTTP Web Services with the X-Ray SDK for Go

When your application makes calls to microservices or public HTTP APIs, you can use the xray.Client to instrument those calls as subsegments of your Go application, as shown in the following example, where http-client is an HTTP client.

Client creates a shallow copy of the provided http client, defaulting to http.DefaultClient, with roundtripper wrapped with xray.RoundTripper.

Example main.go – HTTP client

myClient := xray.Client(http-client)
You can’t perform that action at this time.