package
1.0.0-rc.5
Repository: https://github.com/unosoft/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.
BeginFacadeSegment creates a Segment for a given name and context.
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.
ContextWithConfig returns context with given configuration settings.
DetachContext returns a new context with the existing segment.
Emit segment or subsegment if root segment is sampled.
GetRecorder returns a pointer to the config struct provided in ctx, or nil if no config is set.
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 specific trace fields.
HandlerWithContext wraps the provided http handler and context to parse the incoming headers, add response headers if needed, and sets HTTP specific 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.
NewHTTPSubsegments creates a new HTTPSubsegments to use in httptrace.ClientTrace functions.
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.
# Constants
No description provided by the author
LambdaTaskRootKey is the key to get Lambda Task Root from environment variable.
LambdaTraceHeaderKey is key to get trace header from context.
No description provided by the author
No description provided by the author
SDKInitializedFileFolder records the location of SDK initialized file.
SDKInitializedFileName records the SDK initialized file name.
SDKType records which X-Ray SDK customer uses.
SDKVersion records the current X-Ray Go SDK version.
# 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 unmarshalling data that records exception.
ClientTrace is a set of pointers of HTTPSubsegments and ClientTrace.
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 unmarshalling request and response data.
HTTPSubsegments is a set of context in different HTTP operation.
RecorderContextKey records the key for Config value.
RequestData provides the shape for unmarshalling request data.
ResponseData provides the shape for unmarshalling response data.
SDK provides the shape for unmarshalling an SDK struct.
Segment provides the resource's name, details about the request, and details about the work done.
ServiceData provides the shape for unmarshalling service version.
SQLData provides the shape for unmarshalling 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.