README ¶
AWS X-Ray Plugin
The AWS X-Ray plugin provides integration for the micro toolkit.
Usage
Register the plugin before building Micro
package main
import (
"github.com/micro/micro/plugin"
"github.com/aws/aws-sdk-go/service/xray"
"github.com/micro/go-plugins/micro/trace/awsxray"
)
func init() {
plugin.Register(awsxray.NewXRayPlugin(
// Used as segment name
awsxray.WithName("go.micro.http"),
// Specify X-Ray Daemon Address
awsxray.WithDaemon("localhost:2000"),
// Or X-Ray Client
awsxray.WithClient(xray.New(awsSession)),
))
}
Then just run any component like so
micro api
Scoped to API
If you like to only apply the plugin for a specific component you can register it with that specifically. For example, below you'll see the plugin registered with the API.
package main
import (
"github.com/micro/micro/api"
"github.com/micro/go-plugins/micro/trace/awsxray"
)
func init() {
api.Register(awsxray.NewXRayPlugin())
}
Example
Documentation ¶
Overview ¶
Package awsxray is a micro plugin for whitelisting service requests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewXRayPlugin ¶
Types ¶
type Option ¶
type Option func(o *Options)
func WithClient ¶
WithClient sets the XRay Client to use to send segments
func WithDaemon ¶
WithDaemon sets the address of the XRay Daemon to send segements
Click to show internal directories.
Click to hide internal directories.