- Fixed a bug in
AbstractXRayInterceptor
so thatgenerateMetadata
can be overriden. PR6
- Support for Spring Framework which enables the usage of aspects to trace requests down a call stack. Classes can either implement an interface or be annotated to identify themselves as available to the aspect for tracing. PR1
- Fixed a bug a bug which caused certain non-sampled segments to be emitted to the X-Ray daemon. This issue occurred only when the segment began as sampled and was manually overridden to non-sampled using
setSampled(false)
.
- Fixed a bug in the exception serialization logic that occurred when an added exception had one or more 'cause' exceptions.
- Additional methods added to the
SegmentContext
interface. TheSegmentContext
interface now supports overriding logic for beginning and ending aSegment
. This allows customers to use an alternative toThreadLocal
values to passSegmentContext
throughout program execution.
- Various string fixes.
- Exposed the exceptionless version of the
close()
method on the more genericEntity
type. Generic types may now be used in try-with-resources blocks without requiring acatch
block. - Ignoring subsegment generation on S3 presign request API call.
- Attempting to modify or re-emit a
Segment
now throws an uncheckedAlreadyEmittedException
.
- Fixed a concurrent modification exception which occured when many exceptions were being added to a single subsegment at once.
- Various string fixes.
- Configuration values set using the environment variables
AWS_XRAY_TRACING_NAME
,AWS_XRAY_CONTEXT_MISSING
, andAWS_XRAY_DAEMON_ADDRESS
can now also be set using Java system properties.- The corresponding property keys are
-Dcom.amazonaws.xray.strategy.tracingName
,-Dcom.amazonaws.xray.strategy.contextMissingStrategy
, and-Dcom.amazonaws.xray.emitters.daemonAddress
respectively. - Configuration values set using environment variables take precedence over those set using Java system properties, in turn taking precedence over any configuration values set in code.
- The corresponding property keys are
- Modification or re-emittance of segments or subsegments after they have already been emitted to the X-Ray daemon now results in an AlreadyModifiedException / log message (depending on the
ContextMissingStrategy
in use).
- Support for tracing within AWS Lambda functions
- The provided AWSXRayServletFilter now supports asynchronous
HttpServletRequest
s
- Subsegments representing calls to S3 that result in status codes 304 or 412 will no longer be considered as
fault
s. - Information about the runtime environment (JVM name and version) is now added to segments under the
service
namespace.
- Added an additional constructor to
DefaultThrowableSerializationStrategy
that allows overriding of theThrowable
superclass types which are considered to be remote. - Added more runtime information to the
aws.xray
namespace on segments. - Added a
ContextMissingStrategy
member to theAWSXRayRecorder
class. This allows configuration of the exception behavior exhibited when trace context is not properly propagated. The behavior can be configured in code. Alternatively, the environment variableAWS_XRAY_CONTEXT_MISSING
can be used (overrides any modes set in code). Valid values for this environment variable are currently (case insensitive)RUNTIME_ERROR
andLOG_ERROR
. The default behavior remains,DefaultContextMissingStrategy
extendsRuntimeErrorContextMissingStrategy
; i.e. by default, an exception will be thrown on missing context.
- BREAKING Changed the
currentEntityId
andcurrentTraceId
methods from static to instance-level methods, in order to have them support the configurablecontextMissingBehavior
.
- BREAKING Removed support for the
XRAY_TRACING_NAME
environment variable. - BREAKING Removed the use of
InheritableThreadLocal
values to store trace context, in favor of regularThreadLocal
values. This change was made to improve the safety of the way the SDK interacts with thread pools and other collections of long-lived threads. - Removed behavior in which calls to
AWSXRayRecorder.getThreadLocal()
would throw aSegmentNotFoundException
when the thread local value contained null. The method now returns null instead of throwing an exception.
- Added the
getCurrentSegmentOptional
andgetCurrentSubsegmentOptional
methods to theAWSXRay
andAWSXRayRecorder
classes. - Added pertinent parameters to subsegments wrapping AWS Lambda Invoke and InvokeAsync operations.
- Added the
beginDummySegment()
method to theAWSXRay
class.
- Changed the
sdk
key tosdk_version
in theaws.xray
segment property. - Changed the
getCurrentSegment
method in theAWSXRayRecorder
class to throw aSegmentNotFoundException
if no segment is found. - Changed the behavior of the
LocalizedSamplingStrategy
class to require that all loaded sampling rule JSON files include defaultfixed_target
andrate
values under thedefault
namespace. The file must now be versioned, this release supports"version": 1
of the sampling rules document.- An example is provided in
aws-xray-recorder-sdk-core/src/main/resources/com/amazonaws/xray/strategy/sampling/DefaultSamplingRules.json
.
- An example is provided in
- Changed the behavior of the
aws-xray-recorder-sdk-apache-http
submodule to flag its generated subsegments with error/throttle/fault values based on response codes received from downstream HTTP services.
- Removed the
attribute_names_substituted
key that was previously added to subsegments wrapping some DynamoDB operations. - Removed the single
URL
parameter constructor from theDefaultSamplingStrategy
class. To pass a custom sampling rules file, use theLocalizedSamplingStrategy
.
- Fixed a bug where the continuous injection of thread-local values to other threads caused a memory leak. This change removes the
TraceReference
class.AWSXRayRecorder.infectThreadLocal
is renamed toAWSXRayRecorder.injectThreadLocal
.AWSXRayRecorder.getThreadLocal()
now returns anEntity
rather than aTraceReference
.AWSXRayRecorder.injectThreadLocal(Entity entity)
now accepts anEntity
rather than aTraceReference
.
- No change
- Added the
SegmentNamingStrategy
interface. Instantation of theAWSXRayServletFilter
now requires an instance ofSegmentNamingStrategy
. A shorthand constructor which accepts a singleString
is also provided to simplify use of theFixedSegmentNamingStrategy
. - Added the
FixedSegmentNamingStrategy
andDynamicSegmentNamingStrategy
strategies.
- Fixed a bug in the behavior of the custom pattern generation used in sampling rules and the
DynamicNamingStrategy
. - Changed the segment key under which the SDK version is recorded to "xray".
- Fixed a bug whereby segments with more than 100 subsegments were not properly being streamed to the service.
- Changed the behavior of the
setError
method in theEntityImpl
class to no longer also modify thefault
value. - Changed the environment variable key to modify the target daemon address / port to
AWS_XRAY_DAEMON_ADDRESS
. The value is expected to be of the formip:port
. - Changed the environment variable key to override the segment name from
XRAY_TRACING_NAME
toAWS_XRAY_TRACING_NAME
. (XRAY_TRACING_NAME
will still be supported until the non-beta release). - Moved the
precursor_ids
property to be a member of only theSubsegment
type.
- Added the SDK version to generated segment documents.
- Added functionality to the
DummySegment
class in order to pass the Trace ID to downstream services in all cases, including those in which the current request is not sampled.
- Fixed a bug in AWSXRayServletFilter that prevented the creation of subsegments for some services running behind ALBs.
- Updated the dependency on
com.amazonaws:aws-java-sdk-core
from version 1.11.60 to 1.11.67. - Modified the signatures of the
close()
methods forSegmentImpl
andSubsegmentImpl
to not throw any exceptions.
- Removed redundant HTTP status code parsing logic from the
apache-http
submodule. The AWS X-Ray service handles setting the fault, error, and throttle flags based on subsegments' provided HTTP status code.