@Singleton public class DefaultDiagnosticInfoPopulator extends java.lang.Object implements DiagnosticInfoPopulator
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MDC_DEFAULT_AWS_REQUEST_ID |
static java.lang.String |
MDC_DEFAULT_FUNCTION_ARN |
static java.lang.String |
MDC_DEFAULT_FUNCTION_MEMORY_SIZE |
static java.lang.String |
MDC_DEFAULT_FUNCTION_NAME |
static java.lang.String |
MDC_DEFAULT_FUNCTION_REMAINING_TIME |
static java.lang.String |
MDC_DEFAULT_FUNCTION_VERSION |
static java.lang.String |
MDC_DEFAULT_XRAY_TRACE_ID |
Constructor and Description |
---|
DefaultDiagnosticInfoPopulator() |
Modifier and Type | Method and Description |
---|---|
protected void |
mdcput(java.lang.String key,
java.lang.String val)
Put a diagnostic context value.
|
void |
populateMappingDiagnosticContextValues(com.amazonaws.services.lambda.runtime.Context context)
Populate MDC with Lambda Context values.
|
void |
populateMappingDiagnosticContextWithXrayTraceId()
Populate MDC with XRay Trace ID if it is able to parse it.
|
public static final java.lang.String MDC_DEFAULT_AWS_REQUEST_ID
public static final java.lang.String MDC_DEFAULT_FUNCTION_NAME
public static final java.lang.String MDC_DEFAULT_FUNCTION_VERSION
public static final java.lang.String MDC_DEFAULT_FUNCTION_ARN
public static final java.lang.String MDC_DEFAULT_FUNCTION_MEMORY_SIZE
public static final java.lang.String MDC_DEFAULT_FUNCTION_REMAINING_TIME
public static final java.lang.String MDC_DEFAULT_XRAY_TRACE_ID
public void populateMappingDiagnosticContextValues(@NonNull com.amazonaws.services.lambda.runtime.Context context)
DiagnosticInfoPopulator
populateMappingDiagnosticContextValues
in interface DiagnosticInfoPopulator
context
- The Lambda execution environment context object.protected void mdcput(@NonNull java.lang.String key, @NonNull java.lang.String val) throws java.lang.IllegalArgumentException
key
- non-null keyval
- value to put in the mapjava.lang.IllegalArgumentException
- in case the "key" parameter is nullpublic void populateMappingDiagnosticContextWithXrayTraceId()
DiagnosticInfoPopulator
populateMappingDiagnosticContextWithXrayTraceId
in interface DiagnosticInfoPopulator