Skip to content

Commit cb8169e

Browse files
committed
docs(tracer): update wording that it auto-disables on non-Lambda env
1 parent 06be626 commit cb8169e

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/core/tracer.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Tracer is an opinionated thin wrapper for [AWS X-Ray Python SDK](https://github.
1010
## Key features
1111

1212
* 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
1514
* Support tracing async methods, generators, and context managers
1615
* Auto patch supported modules by AWS X-Ray
1716

@@ -357,11 +356,7 @@ Tracer keeps a copy of its configuration after the first initialization. This is
357356

358357
## Testing your code
359358

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.
365360

366361
## Tips
367362

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ aws serverlessrepo list-application-versions \
223223
| ------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------- |
224224
| **POWERTOOLS_SERVICE_NAME** | Sets service name used for tracing namespace, metrics dimension and structured logging | All | `"service_undefined"` |
225225
| **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` |
227227
| **POWERTOOLS_TRACER_CAPTURE_RESPONSE** | Captures Lambda or method return as metadata. | [Tracing](./core/tracer) | `true` |
228228
| **POWERTOOLS_TRACER_CAPTURE_ERROR** | Captures Lambda or method exception as metadata. | [Tracing](./core/tracer) | `true` |
229229
| **POWERTOOLS_TRACE_MIDDLEWARES** | Creates sub-segment for each custom middleware | [Middleware factory](./utilities/middleware_factory) | `false` |

0 commit comments

Comments
 (0)