public final class TracingUtils
extends java.lang.Object
| Constructor and Description |
|---|
TracingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
defaultObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Sets the instance of ObjectMapper object which is used for serialising object response when
@Tracing(captureMode=CaptureMode.RESPONSE). |
static com.fasterxml.jackson.databind.ObjectMapper |
objectMapper() |
static void |
putAnnotation(java.lang.String key,
java.lang.Boolean value)
Put an annotation to the current subsegment with a Boolean value.
|
static void |
putAnnotation(java.lang.String key,
java.lang.Number value)
Put an annotation to the current subsegment with a Number value.
|
static void |
putAnnotation(java.lang.String key,
java.lang.String value)
Put an annotation to the current subsegment with a String value.
|
static void |
putMetadata(java.lang.String key,
java.lang.Object value)
Put additional metadata for the current subsegment.
|
static void |
putMetadata(java.lang.String namespace,
java.lang.String key,
java.lang.Object value)
Put additional metadata for the current subsegment.
|
static void |
withEntitySubsegment(java.lang.String name,
com.amazonaws.xray.entities.Entity entity,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
Adds a new subsegment around the passed consumer.
|
static void |
withEntitySubsegment(java.lang.String namespace,
java.lang.String name,
com.amazonaws.xray.entities.Entity entity,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
Adds a new subsegment around the passed consumer.
|
static void |
withSubsegment(java.lang.String name,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
Adds a new subsegment around the passed consumer.
|
static void |
withSubsegment(java.lang.String namespace,
java.lang.String name,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
Adds a new subsegment around the passed consumer.
|
public static void putAnnotation(java.lang.String key,
java.lang.String value)
key - the key of the annotationvalue - the value of the annotationpublic static void putAnnotation(java.lang.String key,
java.lang.Number value)
key - the key of the annotationvalue - the value of the annotationpublic static void putAnnotation(java.lang.String key,
java.lang.Boolean value)
key - the key of the annotationvalue - the value of the annotationpublic static void putMetadata(java.lang.String key,
java.lang.Object value)
Tracingkey - the key of the metadatavalue - the value of the metadatapublic static void putMetadata(java.lang.String namespace,
java.lang.String key,
java.lang.Object value)
namespace - the namespace of the metadatakey - the key of the metadatavalue - the value of the metadatapublic static void withEntitySubsegment(java.lang.String name,
com.amazonaws.xray.entities.Entity entity,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
Tracing
This method is intended for use with multi-threaded programming where the
context is lost between threads.name - the name of the subsegmententity - the current x-ray contextsubsegment - the x-ray subsegment for the wrapped consumerpublic static void withEntitySubsegment(java.lang.String namespace,
java.lang.String name,
com.amazonaws.xray.entities.Entity entity,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
namespace - the namespace of the subsegmentname - the name of the subsegmententity - the current x-ray contextsubsegment - the x-ray subsegment for the wrapped consumerpublic static void withSubsegment(java.lang.String name,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
Tracingname - the name of the subsegmentsubsegment - the x-ray subsegment for the wrapped consumerpublic static void withSubsegment(java.lang.String namespace,
java.lang.String name,
java.util.function.Consumer<com.amazonaws.xray.entities.Subsegment> subsegment)
namespace - the namespace for the subsegmentname - the name of the subsegmentsubsegment - the x-ray subsegment for the wrapped consumerpublic static void defaultObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
@Tracing(captureMode=CaptureMode.RESPONSE).objectMapper - Custom implementation of object mapper to be used for serializing responsepublic static com.fasterxml.jackson.databind.ObjectMapper objectMapper()
Copyright © 2022. All rights reserved.