Skip to content

Commit c25279c

Browse files
docs: main page updates around support (#1133)
* docs: main page updates around support * Update docs/index.md Co-authored-by: Heitor Lessa <[email protected]> Co-authored-by: Heitor Lessa <[email protected]>
1 parent f71a79f commit c25279c

File tree

4 files changed

+215
-264
lines changed

4 files changed

+215
-264
lines changed

Diff for: docs/core/logger.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ The library requires two settings. You can set them as environment variables, or
5252

5353
These settings will be used across all logs emitted:
5454

55-
| Setting | Description | Environment variable | Constructor parameter |
56-
|-------------------|------------------------------------------------------------------------------------------------------------------|---------------------------|-----------------------|
57-
| **Logging level** | Sets how verbose Logger should be (INFO, by default). Supported values are: `DEBUG`, `INFO`, `WARN`, `ERROR` | `LOG_LEVEL` | `logLevel` |
58-
| **Service name** | Sets the name of service of which the Lambda function is part of, that will be present across all log statements | `POWERTOOLS_SERVICE_NAME` | `serviceName` |
59-
60-
For a **complete list** of supported environment variables, refer to [this section](./../index.md#environment-variables).
55+
| Setting | Description | Environment variable | Constructor parameter |
56+
|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|-----------------------|
57+
| **Service name** | Sets the name of service of which the Lambda function is part of, that will be present across all log statements | `POWERTOOLS_SERVICE_NAME` | `serviceName` |
58+
| **Logging level** | Sets how verbose Logger should be (INFO, by default). Supported values are: `DEBUG`, `INFO`, `WARN`, `ERROR` | `LOG_LEVEL` | `logLevel` |
59+
| **Log incoming event** | Whether to log or not the incoming event when using the decorator or middleware. Supported values are: `true`, or `false`, disabled by default | `POWERTOOLS_LOGGER_LOG_EVENT` | `logEvent` |
60+
| **Debug log sampling** | Probability that a Lambda invocation will print all the log items regardless of the log level setting. Supported values range from `0.0` to `1` | `POWERTOOLS_LOGGER_SAMPLE_RATE` | `sampleRateValue` |
6161

6262
#### Example using AWS Serverless Application Model (SAM)
6363

Diff for: docs/core/metrics.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ These settings will be used across all metrics emitted:
6868

6969
| Setting | Description | Environment variable | Constructor parameter |
7070
|----------------------|---------------------------------------------------------------------------------|--------------------------------|-----------------------|
71-
| **Metric namespace** | Logical container where all metrics will be placed e.g. `serverlessAirline` | `POWERTOOLS_METRICS_NAMESPACE` | `namespace` |
7271
| **Service** | Optionally, sets **service** metric dimension across all metrics e.g. `payment` | `POWERTOOLS_SERVICE_NAME` | `serviceName` |
73-
74-
For a **complete list** of supported environment variables, refer to [this section](./../index.md#environment-variables).
72+
| **Metric namespace** | Logical container where all metrics will be placed e.g. `serverlessAirline` | `POWERTOOLS_METRICS_NAMESPACE` | `namespace` |
7573

7674
!!! tip
7775
Use your application name or main service as the metric namespace to easily group all metrics
@@ -299,7 +297,7 @@ Using the Middy middleware or decorator will **automatically validate, serialize
299297
If you do not use the middleware or decorator, you have to flush your metrics manually.
300298

301299
!!! warning "Metric validation"
302-
If metrics are provided, and any of the following criteria are not met, a **`RangeError`** exception will be thrown:
300+
If metrics are provided, and any of the following criteria are not met, a **`RangeError`** error will be thrown:
303301

304302
* Maximum of 29 dimensions
305303
* Namespace is set only once (or none)

Diff for: docs/core/tracer.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ The `Tracer` utility must always be instantiated outside of the Lambda handler.
5050

5151
The library has three optional settings. You can set them as environment variables, or pass them in the constructor:
5252

53-
Setting | Description | Environment variable | Constructor parameter
54-
------------------------------------------------- |------------------------------------------------------------------------------------------------| ------------------------------------------------- | -------------------------------------------------
55-
**Tracing enabled** | Enables or disables tracing. By default tracing is enabled when running in AWS Lambda. | `POWERTOOLS_TRACE_ENABLED` | `enabled`
56-
**Service name** | Sets an annotation with the **name of the service** across all traces e.g. `serverlessAirline` | `POWERTOOLS_SERVICE_NAME` | `serviceName`
57-
**Capture HTTPs Requests** | Defines whether HTTPs requests will be traced or not, enabled by default when tracing is also enabled. | `POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS` | `captureHTTPsRequests`
58-
59-
For a **complete list** of supported environment variables, refer to [this section](./../index.md#environment-variables).
53+
| Setting | Description | Environment variable | Constructor parameter |
54+
|----------------------------|-----------------------------------------------------------------------------------------------------------------| -------------------------------------------|------------------------|
55+
| **Service name** | Sets an annotation with the **name of the service** across all traces e.g. `serverlessAirline` | `POWERTOOLS_SERVICE_NAME` | `serviceName` |
56+
| **Tracing enabled** | Enables or disables tracing. By default tracing is enabled when running in AWS Lambda | `POWERTOOLS_TRACE_ENABLED` | `enabled` |
57+
| **Capture HTTPs Requests** | Defines whether HTTPs requests will be traced or not, enabled by default when tracing is also enabled | `POWERTOOLS_TRACER_CAPTURE_HTTPS_REQUESTS` | `captureHTTPsRequests` |
58+
| **Capture Response** | Defines whether functions responses are serialized as metadata, enabled by default when tracing is also enabled | `POWERTOOLS_TRACER_CAPTURE_RESPONSE` | `captureResult` |
59+
| **Capture Errors** | Defines whether functions errors are serialized as metadata, enabled by default when tracing is also enabled | `POWERTOOLS_TRACER_CAPTURE_ERROR` | N/A |
6060

6161
!!! note
6262
Before your use this utility, your AWS Lambda function must have [Active Tracing enabled](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html) as well as [have permissions](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html#services-xray-permissions) to send traces to AWS X-Ray
@@ -476,13 +476,13 @@ Alternatively, use the `captureResponse: false` option in both `tracer.captureLa
476476
.use(captureLambdaHandler(tracer, { captureResponse: false }));
477477
```
478478

479-
### Disabling exception auto-capture
479+
### Disabling errors auto-capture
480480

481-
Use **`POWERTOOLS_TRACER_CAPTURE_ERROR=false`** environment variable to instruct Tracer **not** to serialize exceptions as metadata.
481+
Use **`POWERTOOLS_TRACER_CAPTURE_ERROR=false`** environment variable to instruct Tracer **not** to serialize errors as metadata.
482482

483483
!!! info "Commonly useful in one scenario"
484484

485-
1. You might **return sensitive** information from exceptions, stack traces you might not control
485+
1. You might **return sensitive** information from errors, stack traces you might not control
486486

487487
### Escape hatch mechanism
488488

0 commit comments

Comments
 (0)