Documentation ¶
Index ¶
- Variables
- func GetParentId(header string) string
- func GetTraceId(header string) string
- func NewContext(ctx context.Context, s *Segment) context.Context
- func SetParentId(header, parentId string) string
- func SetTraceId(header, traceId string) string
- type AWSXRay
- type HTTP
- type Option
- type Options
- type Request
- type Response
- type Segment
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TraceHeader = "X-Amzn-Trace-Id"
)
Functions ¶
func GetParentId ¶
GetParentId returns parent id from header or blank
func GetTraceId ¶
GetTraceId returns trace id from header or blank
func SetParentId ¶
SetParentId will set the parent id of a trace in the header
func SetTraceId ¶
SetTraceId will set the trace id in the header
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
type Segment ¶
type Segment struct { // user expected to protect changes sync.RWMutex Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Id string `json:"id,omitempty"` TraceId string `json:"trace_id,omitempty"` ParentId string `json:"parent_id,omitempty"` StartTime float64 `json:"start_time,omitempty"` EndTime float64 `json:"end_time,omitempty"` HTTP *HTTP `json:"http,omitempty"` Error bool `json:"error,omitempty"` Fault bool `json:"fault,omitempty"` }
Click to show internal directories.
Click to hide internal directories.