package
1.8.5
Repository: https://github.com/aws/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.
AWSSession adds X-Ray tracing to an AWS session.
AWSSessionWithWhitelist allows a custom parameter whitelist JSON file to be defined.
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.
No description provided by the author
BeginSubsegment creates a subsegment for a given name and context.
No description provided by the author
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.
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.
HttpCaptureResponse fill response by http status code.
No description provided by the author
NewClientTrace returns an instance of xray.ClientTrace, a wrapper around httptrace.ClientTrace.
NewDefaultEmitter initializes and returns a pointer to an instance of DefaultEmitter.
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.
NewFastHTTPInstrumentor returns a struct that provides Handle method that satisfy fasthttp.RequestHandler interface.
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.
Check if SDK is disabled.
SetLogger sets the logger instance used by xray.
SQLConnector wraps the connector, and traces SQL executions.
SQLContext 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.
UnaryClientInterceptor provides gRPC unary client interceptor.
UnaryServerInterceptor provides gRPC unary server interceptor.
WithRecorder configures the instrumentation by given xray.Config.
WithSegmentNamer makes the interceptor use the segment namer to name the segment.

# Constants

ExtendedRequestIDKey is the key name of the extend request id.
Header is added before sending segments to daemon.
LambdaTaskRootKey is the key to get Lambda Task Root from environment variable.
LambdaTraceHeaderKey is key to get trace header from context.
RequestIDKey is the key name of the request id.
S3ExtendedRequestIDHeaderKey is the key name of the s3 extend request id.
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.
TraceIDHeaderKey is the HTTP header name used for tracing.

# Variables

ContextKey returns a pointer to a newly allocated zero value of ContextKeytype.
ErrRetrieveSegment happens when a segment cannot be retrieved.

# 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.
DefaultEmitter provides the naive implementation of emitting trace entities.
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.

# Interfaces

Emitter provides an interface for implementing emitting trace entities.
No description provided by the author
No description provided by the author
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.