File tree 2 files changed +3
-8
lines changed
2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ Tracer is an opinionated thin wrapper for [AWS X-Ray Python SDK](https://github.
10
10
## Key features
11
11
12
12
* Auto capture cold start as annotation, and responses or full exceptions as metadata
13
- * Run functions locally with SAM CLI without code change to disable tracing
14
- * Explicitly disable tracing via env var ` POWERTOOLS_TRACE_DISABLED="true" `
13
+ * Auto-disable when not running in AWS Lambda environment
15
14
* Support tracing async methods, generators, and context managers
16
15
* Auto patch supported modules by AWS X-Ray
17
16
@@ -357,11 +356,7 @@ Tracer keeps a copy of its configuration after the first initialization. This is
357
356
358
357
## Testing your code
359
358
360
- You can safely disable Tracer when unit testing your code using ` POWERTOOLS_TRACE_DISABLED ` environment variable.
361
-
362
- ``` bash
363
- POWERTOOLS_TRACE_DISABLED=1 python -m pytest
364
- ```
359
+ Tracer is disabled by default when not running in the AWS Lambda environment - This means no code changes or environment variables to be set.
365
360
366
361
## Tips
367
362
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ aws serverlessrepo list-application-versions \
223
223
| ------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------- |
224
224
| ** POWERTOOLS_SERVICE_NAME** | Sets service name used for tracing namespace, metrics dimension and structured logging | All | ` "service_undefined" ` |
225
225
| ** POWERTOOLS_METRICS_NAMESPACE** | Sets namespace used for metrics | [ Metrics] ( ./core/metrics ) | ` None ` |
226
- | ** POWERTOOLS_TRACE_DISABLED** | Disables tracing | [ Tracing] ( ./core/tracer ) | ` false ` |
226
+ | ** POWERTOOLS_TRACE_DISABLED** | Explicitly disables tracing | [ Tracing] ( ./core/tracer ) | ` false ` |
227
227
| ** POWERTOOLS_TRACER_CAPTURE_RESPONSE** | Captures Lambda or method return as metadata. | [ Tracing] ( ./core/tracer ) | ` true ` |
228
228
| ** POWERTOOLS_TRACER_CAPTURE_ERROR** | Captures Lambda or method exception as metadata. | [ Tracing] ( ./core/tracer ) | ` true ` |
229
229
| ** POWERTOOLS_TRACE_MIDDLEWARES** | Creates sub-segment for each custom middleware | [ Middleware factory] ( ./utilities/middleware_factory ) | ` false ` |
You can’t perform that action at this time.
0 commit comments