Package io.micronaut.function.aws
Class DefaultDiagnosticInfoPopulator
java.lang.Object
io.micronaut.function.aws.DefaultDiagnosticInfoPopulator
- All Implemented Interfaces:
DiagnosticInfoPopulator
@Singleton
public class DefaultDiagnosticInfoPopulator
extends Object
implements DiagnosticInfoPopulator
- Since:
- 3.2.2
- Author:
- Sergio del Amo, Constantine Linnick
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Put a diagnostic context value.void
populateMappingDiagnosticContextValues
(@NonNull com.amazonaws.services.lambda.runtime.Context context) Populate MDC with Lambda Context values.void
Populate MDC with XRay Trace ID if it is able to parse it.
-
Field Details
-
MDC_DEFAULT_AWS_REQUEST_ID
- See Also:
-
MDC_DEFAULT_FUNCTION_NAME
- See Also:
-
MDC_DEFAULT_FUNCTION_VERSION
- See Also:
-
MDC_DEFAULT_FUNCTION_ARN
- See Also:
-
MDC_DEFAULT_FUNCTION_MEMORY_SIZE
- See Also:
-
MDC_DEFAULT_FUNCTION_REMAINING_TIME
- See Also:
-
MDC_DEFAULT_XRAY_TRACE_ID
- See Also:
-
-
Constructor Details
-
DefaultDiagnosticInfoPopulator
public DefaultDiagnosticInfoPopulator()
-
-
Method Details
-
populateMappingDiagnosticContextValues
public void populateMappingDiagnosticContextValues(@NonNull @NonNull com.amazonaws.services.lambda.runtime.Context context) Description copied from interface:DiagnosticInfoPopulator
Populate MDC with Lambda Context values.- Specified by:
populateMappingDiagnosticContextValues
in interfaceDiagnosticInfoPopulator
- Parameters:
context
- The Lambda execution environment context object.- See Also:
-
mdcput
protected void mdcput(@NonNull @NonNull String key, @NonNull @NonNull String val) throws IllegalArgumentException Put a diagnostic context value.- Parameters:
key
- non-null keyval
- value to put in the map- Throws:
IllegalArgumentException
- in case the "key" parameter is null
-
populateMappingDiagnosticContextWithXrayTraceId
public void populateMappingDiagnosticContextWithXrayTraceId()Description copied from interface:DiagnosticInfoPopulator
Populate MDC with XRay Trace ID if it is able to parse it.- Specified by:
populateMappingDiagnosticContextWithXrayTraceId
in interfaceDiagnosticInfoPopulator
-