package
0.9.4
Repository: https://github.com/srprash/aws-xray-sdk-go.git
Documentation: pkg.go.dev

# Functions

AddAnnotation adds an annotation to the provided segment or subsegment in ctx.
AddError adds an error to the provided segment or subsegment in ctx.
AddMetadata adds a metadata to the provided segment or subsegment in ctx.
AddMetadataToNamespace adds a namespace to the provided segment's or subsegment's metadata in ctx.
AWS adds X-Ray tracing to an AWS client.
AWSWithWhitelist allows a custom parameter whitelist JSON file to be defined.
BeginSegment creates a Segment for a given name and context.
BeginSubsegment creates a subsegment for a given name and context.
Capture traces the provided synchronous function by beginning and closing a subsegment around its execution.
CaptureAsync traces an arbitrary code segment within a goroutine.
Client creates a shallow copy of the provided http client, defaulting to http.DefaultClient, with roundtripper wrapped with xray.RoundTripper.
Configure overrides default configuration options with customer-defined values.
DetachContext returns a new context with the existing segment.
GetSegment returns a pointer to the segment or subsegment provided in ctx, or nil if no segment or subsegment is found.
Handler wraps the provided http handler with xray.Capture using the request's context, parsing the incoming headers, adding response headers if needed, and sets HTTP sepecific trace fields.
NewClientTrace returns an instance of xray.ClientTrace, a wrapper around httptrace.ClientTrace.
NewDefaultStreamingStrategy initializes and returns a pointer to an instance of DefaultStreamingStrategy.
NewDefaultStreamingStrategyWithMaxSubsegmentCount initializes and returns a pointer to an instance of DefaultStreamingStrategy with a custom maximum number of subsegments per UDP packet.
NewDynamicSegmentNamer creates a new dynamic segment namer.
NewFixedSegmentNamer initializes a FixedSegmentNamer which will provide a fixed segment name for every generated segment.
NewSegmentFromHeader creates a segment for downstream call and add information to the segment that gets from HTTP header.
NewSegmentID generates a string format of segment ID.
NewTraceID generates a string format of random trace ID.
RequestWasTraced returns true if the context contains an X-Ray segment that was created from an HTTP request that contained a trace header.
RoundTripper wraps the provided http roundtripper with xray.Capture, sets HTTP-specific xray fields, and adds the trace header to the outbound request.
SQL opens a normalized and traced wrapper around an *sql.DB connection.
TraceID returns the canonical ID of the cross-service trace from the given segment in ctx.

# Variables

ContextKey returns a pointer to a newly allocated zero value of ContextKeytype.
ErrRetrieveSegment happens when a segment cannot be retrieved.
Header is added before sending segments to daemon.

# Structs

CauseData provides the shape for unmarshaling data that records exception.
No description provided by the author
Config is a set of X-Ray configurations.
DB copies the interface of sql.DB but adds X-Ray tracing.
DefaultStreamingStrategy provides a default value of 20 for the maximum number of subsegments that can be emitted in a single UDP packet.
DynamicSegmentNamer chooses names for segments generated for incoming requests by parsing the HOST header of the incoming request.
FixedSegmentNamer records the fixed name of service node.
HTTPData provides the shape for unmarshaling request and response data.
No description provided by the author
RequestData provides the shape for unmarshaling request data.
ResponseData provides the shape for unmarshaling response data.
Segment provides the resource's name, details about the request, and details about the work done.
ServiceData provides the shape for unmarshaling service version.
SQLData provides the shape for unmarshaling sql data.
Stmt copies the interface of sql.Stmt but adds X-Ray tracing.
Tx copies the interface of sql.Tx but adds X-Ray tracing.

# Interfaces

SegmentNamer is the interface for naming service node.
StreamingStrategy provides an interface for implementing streaming strategies.

# Type aliases

ContextKeytype defines integer to be type of ContextKey.