Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDGenerator ¶
IDGenerator is used for generating a new traceID and spanID.
func NewIDGenerator ¶
func NewIDGenerator() *IDGenerator
NewIDGenerator returns an IDGenerator reference used for sending traces to AWS X-Ray.
type Propagator ¶
type Propagator struct{}
Propagator serializes Span Context to/from AWS X-Ray headers.
Example AWS X-Ray format:
X-Amzn-Trace-Id: Root={traceId};Parent={parentId};Sampled={samplingFlag}.
func (Propagator) Extract ¶
func (xray Propagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
Extract gets a context from the carrier if it contains AWS X-Ray headers.
func (Propagator) Fields ¶
func (xray Propagator) Fields() []string
Fields returns list of fields used by HTTPTextFormat.
func (Propagator) Inject ¶
func (xray Propagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject injects a context to the carrier following AWS X-Ray format.
Click to show internal directories.
Click to hide internal directories.