Skip to content

Commit 7c56887

Browse files
committed
revert: one-line admonition for consistency
1 parent ee38dcd commit 7c56887

File tree

4 files changed

+27
-14
lines changed

4 files changed

+27
-14
lines changed

docs/core/logger.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ Key | Example
129129

130130
When debugging in non-production environments, you can instruct Logger to log the incoming event with `log_event` param or via `POWERTOOLS_LOGGER_LOG_EVENT` env var.
131131

132-
!!! warning "Warning: This is disabled by default to prevent sensitive info being logged"
132+
???+ warning
133+
This is disabled by default to prevent sensitive info being logged
133134

134135
=== "log_handler_event.py"
135136

@@ -147,7 +148,8 @@ When debugging in non-production environments, you can instruct Logger to log th
147148

148149
You can set a Correlation ID using `correlation_id_path` param by passing a [JMESPath expression](https://jmespath.org/tutorial.html){target="_blank"}.
149150

150-
!!! tip "Tip: You can retrieve correlation IDs via `get_correlation_id` method"
151+
???+ tip
152+
You can retrieve correlation IDs via `get_correlation_id` method
151153

152154
=== "collect.py"
153155

@@ -595,7 +597,8 @@ You can use values ranging from `0.0` to `1` (100%) when setting `POWERTOOLS_LOG
595597

596598
Sampling decision happens at the Logger initialization. This means sampling may happen significantly more or less than depending on your traffic patterns, for example a steady low number of invocations and thus few cold starts.
597599

598-
!!! note "Note: Open a [feature request](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=feature-request%2C+triage&template=feature_request.md&title=) if you want Logger to calculate sampling for every invocation"
600+
???+ note
601+
Open a [feature request](https://github.com/awslabs/aws-lambda-powertools-python/issues/new?assignees=&labels=feature-request%2C+triage&template=feature_request.md&title=) if you want Logger to calculate sampling for every invocation
599602

600603
=== "collect.py"
601604

@@ -883,7 +886,8 @@ For **minor changes like remapping keys** after all log record processing has co
883886

884887
For **replacing the formatter entirely**, you can subclass `BasePowertoolsFormatter`, implement `append_keys` method, and override `format` standard logging method. This ensures the current feature set of Logger like [injecting Lambda context](#capturing-lambda-context-info) and [sampling](#sampling-debug-logs) will continue to work.
885888

886-
!!! info "Info: You might need to implement `remove_keys` method if you make use of the feature too."
889+
???+ info
890+
You might need to implement `remove_keys` method if you make use of the feature too.
887891

888892
=== "collect.py"
889893

@@ -1016,7 +1020,8 @@ This is a Pytest sample that provides the minimum information necessary for Logg
10161020
your_lambda_handler(test_event, lambda_context)
10171021
```
10181022

1019-
!!! tip "Tip: Check out the built-in [Pytest caplog fixture](https://docs.pytest.org/en/latest/how-to/logging.html){target="_blank"} to assert plain log messages"
1023+
???+ tip
1024+
Check out the built-in [Pytest caplog fixture](https://docs.pytest.org/en/latest/how-to/logging.html){target="_blank"} to assert plain log messages
10201025

10211026
### Pytest live log feature
10221027

docs/core/metrics.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Setting | Description | Environment variable | Constructor parameter
7070

7171
You can create metrics using `add_metric`, and you can create dimensions for all your aggregate metrics using `add_dimension` method.
7272

73-
!!! tip
73+
???+ tip
7474
You can initialize Metrics in any other module too. It'll keep track of your aggregate metrics in memory to optimize costs (one blob instead of multiples).
7575

7676
=== "Metrics"
@@ -336,7 +336,8 @@ CloudWatch EMF uses the same dimensions across all your metrics. Use `single_met
336336

337337
If you prefer not to use `log_metrics` because you might want to encapsulate additional logic when doing so, you can manually flush and clear metrics as follows:
338338

339-
!!! warning "Warning: Metrics, dimensions and namespace validation still applies"
339+
???+ warning
340+
Metrics, dimensions and namespace validation still applies
340341

341342
=== "manual_metric_serialization.py"
342343

@@ -358,7 +359,7 @@ If you prefer not to use `log_metrics` because you might want to encapsulate add
358359

359360
### Environment variables
360361

361-
!!! tip
362+
???+ tip
362363
Ignore this section, if you are explicitly setting namespace/default dimension via `namespace` and `service` parameters.
363364

364365
For example, `Metrics(namespace=ApplicationName, service=ServiceName)`

docs/core/tracer.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ You can trace synchronous functions using the `capture_method` decorator.
113113

114114
### Asynchronous and generator functions
115115

116-
!!! warning "Warning: We do not support asynchronous Lambda handler"
116+
???+ warning
117+
We do not support asynchronous Lambda handler
117118

118119
You can trace asynchronous functions and generator functions (including context managers) using `capture_method`.
119120

@@ -235,7 +236,8 @@ Use **`capture_response=False`** parameter in both `capture_lambda_handler` and
235236

236237
Use **`capture_error=False`** parameter in both `capture_lambda_handler` and `capture_method` decorators to instruct Tracer **not** to serialize exceptions as metadata.
237238

238-
!!! info "Info: Useful when returning sensitive information in exceptions/stack traces you don't control"
239+
???+ info
240+
Useful when returning sensitive information in exceptions/stack traces you don't control
239241

240242
=== "sensitive_data_exception.py"
241243

@@ -249,7 +251,8 @@ Use **`capture_error=False`** parameter in both `capture_lambda_handler` and `ca
249251

250252
### Tracing aiohttp requests
251253

252-
!!! info "Info: This snippet assumes you have aiohttp as a dependency"
254+
???+ info
255+
This snippet assumes you have aiohttp as a dependency
253256

254257
You can use `aiohttp_trace_config` function to create a valid [aiohttp trace_config object](https://docs.aiohttp.org/en/stable/tracing_reference.html). This is necessary since X-Ray utilizes aiohttp trace hooks to capture requests end-to-end.
255258

@@ -293,7 +296,8 @@ This is useful when you need a feature available in X-Ray that is not available
293296

294297
### Concurrent asynchronous functions
295298

296-
!!! warning "Warning: [X-Ray SDK will raise an exception](https://github.com/aws/aws-xray-sdk-python/issues/164) when async functions are run and traced concurrently"
299+
???+ warning
300+
[X-Ray SDK will raise an exception](https://github.com/aws/aws-xray-sdk-python/issues/164) when async functions are run and traced concurrently
297301

298302
A safe workaround mechanism is to use `in_subsegment_async` available via Tracer escape hatch (`tracer.provider`).
299303

docs/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ Despite having more steps compared to the [public Layer ARN](#lambda-layer) opti
201201
???+ warning
202202
**Layer-extras** does not support Python 3.6 runtime. This layer also includes all extra dependencies: `22.4MB zipped`, `~155MB unzipped`.
203203

204-
!!! tip "Tip: You can create a shared Lambda Layers stack and make this along with other account level layers stack."
204+
???+ tip
205+
You can create a shared Lambda Layers stack and make this along with other account level layers stack.
206+
205207

206208
If using SAM, you can include this SAR App as part of your shared Layers stack, and lock to a specific semantic version. Once deployed, it'll be available across the account this is deployed to.
207209

@@ -434,7 +436,8 @@ You can fetch available versions via SAR API with:
434436

435437
## Environment variables
436438

437-
???+ info "Info: Explicit parameters take precedence over environment variables"
439+
???+ info
440+
Explicit parameters take precedence over environment variables
438441

439442
| Environment variable | Description | Utility | Default |
440443
| ------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------- |

0 commit comments

Comments
 (0)