@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Tracing
Tracing is used to signal that the annotated method should
be extended with the Powertools for AWS Lambda (Java) tracing functionality.
Tracing provides functionality to reduce the overhead
of performing common tracing tasks.
Tracing should be used with the handleRequest method of a class
which implements either
com.amazonaws.services.lambda.runtime.RequestHandler or
com.amazonaws.services.lambda.runtime.RequestStreamHandler.
By default Tracing will capture responses and add them
to a sub segment named after the method.
To disable this functionality you can specify @Tracing( captureResponse = false)
By default Tracing will capture errors and add them
to a sub segment named after the method.
To disable this functionality you can specify @Tracing( captureError = false)
All traces have a namespace set. If @Tracing( namespace = "ExampleService") is set
this takes precedent over any value set in the environment variable POWER_TOOLS_SERVICE_NAME.
If both are undefined then the value will default to service_undefined
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
captureError
Deprecated.
As of release 1.2.0, replaced by captureMode()
in order to support different modes and support via
environment variables
|
CaptureMode |
captureMode |
boolean |
captureResponse
Deprecated.
As of release 1.2.0, replaced by captureMode()
in order to support different modes and support via
environment variables
|
java.lang.String |
namespace |
java.lang.String |
segmentName |
@Deprecated public abstract boolean captureResponse
@Deprecated public abstract boolean captureError
public abstract CaptureMode captureMode
Copyright © 2023. All rights reserved.