You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/tracing.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ The Powertools service name is used as the X-Ray namespace. This can be set usin
42
42
43
43
### Lambda handler
44
44
45
-
To enable Powertools tracing to your function add the `@Tracing annotation to your `handleRequest` method or on
45
+
To enable Powertools tracing to your function add the `@Tracing` annotation to your `handleRequest` method or on
46
46
any method will capture the method as a separate subsegment automatically. You can optionally choose to customize
47
47
segment name that appears in traces.
48
48
@@ -81,6 +81,13 @@ segment name that appears in traces.
81
81
}
82
82
```
83
83
84
+
When using this `@Tracing` annotation, Utility performs these additional tasks to ease operations:
85
+
86
+
* Creates a `ColdStart` annotation to easily filter traces that have had an initialization overhead.
87
+
* Creates a `Service` annotation if service parameter or `POWERTOOLS_SERVICE_NAME` is set.
88
+
* Captures any response, or full exceptions generated by the handler, and include as tracing metadata.
89
+
90
+
84
91
By default, this annotation will automatically record method responses and exceptions. You can change the default behavior by setting
85
92
the environment variables `POWERTOOLS_TRACER_CAPTURE_RESPONSE` and `POWERTOOLS_TRACER_CAPTURE_ERROR` as needed. Optionally, you can override behavior by
86
93
different supported `captureMode` to record response, exception or both.
Copy file name to clipboardExpand all lines: powertools-tracing/src/main/java/software/amazon/lambda/powertools/tracing/internal/LambdaTracingAspect.java
+1
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ public Object around(ProceedingJoinPoint pjp,
Copy file name to clipboardExpand all lines: powertools-tracing/src/test/java/software/amazon/lambda/powertools/tracing/internal/LambdaTracingAspectTest.java
0 commit comments