1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-30 22:33:49 +02:00
Files
go-micro/plugins/wrapper/trace/awsxray
Jerry 93ba8cd0df continue fix pre version go get bug that unknown v3.5.1 (#2188)
* 1.fix plugins go get bug.
2.update all mode.
3.add tidy tools

* continue fix pre version go get bug that unknown v3.5.1
2021-06-30 09:24:00 +01:00
..
2021-01-20 21:01:10 +00:00
2020-12-26 15:32:45 +00:00
2021-06-30 07:21:03 +01:00
2020-12-26 15:32:45 +00:00
2020-12-26 15:32:45 +00:00
2021-01-20 21:01:10 +00:00

AWS X-Ray Wrappers

AWS X-Ray wrappers make use of either the AWS API or the X-Ray Daemon.

Usage

opts := []awsxray.Option{
	// Used as segment name
	awsxray.WithName("go.micro.srv.greeter"),
	// Specify X-Ray Daemon Address
	awsxray.WithDaemon("localhost:2000"),
	// Or X-Ray Client
	awsxray.WithClient(xray.New(awsSession)),
}

service := micro.NewService(
	micro.Name("go.micro.srv.greeter"),
	micro.WrapCall(awsxray.NewCallWrapper(opts...)),
	micro.WrapClient(awsxray.NewClientWrapper(opts...)),
	micro.WrapHandler(awsxray.NewHandlerWrapper(opts...)),
)

Example