Skip to content

Commit 238b81f

Browse files
committed
Update highlighted lines
1 parent 3263a04 commit 238b81f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/utilities/middleware_factory.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can create your own middleware using `lambda_handler_decorator`. The decorat
3030
### Middleware with before logic
3131

3232
=== "getting_started_middleware_before_logic_function.py"
33-
```python hl_lines="5 26 27 32 33 35 40 41"
33+
```python hl_lines="5 26-31 36 37 39 44 45"
3434
--8<-- "examples/middleware_factory/src/getting_started_middleware_before_logic_function.py"
3535
```
3636

@@ -43,7 +43,7 @@ You can create your own middleware using `lambda_handler_decorator`. The decorat
4343
### Middleware with after logic
4444

4545
=== "getting_started_middleware_after_logic_function.py"
46-
```python hl_lines="7 14 15 21-23 37"
46+
```python hl_lines="8 14-19 24-26 40 41"
4747
--8<-- "examples/middleware_factory/src/getting_started_middleware_after_logic_function.py"
4848
```
4949

@@ -58,7 +58,7 @@ You can create your own middleware using `lambda_handler_decorator`. The decorat
5858
You can also have your own keyword arguments after the mandatory arguments.
5959

6060
=== "getting_started_middleware_with_params_function.py"
61-
```python hl_lines="6 30 31 32 36 52"
61+
```python hl_lines="6 30-37 41 56 57"
6262
--8<-- "examples/middleware_factory/src/getting_started_middleware_with_params_function.py"
6363
```
6464

@@ -83,7 +83,7 @@ You can also use [`POWERTOOLS_TRACE_MIDDLEWARES`](#tracing-middleware-execution)
8383
For advanced use cases, you can instantiate [Tracer](../core/tracer.md){target="_blank"} inside your middleware, and add annotations as well as metadata for additional operational insights.
8484

8585
=== "advanced_middleware_tracer_function.py"
86-
```python hl_lines="7 9 12 16 17 19 25 42"
86+
```python hl_lines="7 9 12 16 17 22 28 45 46"
8787
--8<-- "examples/middleware_factory/src/advanced_middleware_tracer_function.py"
8888
```
8989

@@ -105,7 +105,7 @@ This makes use of an existing Tracer instance that you may have initialized anyw
105105
You must [enable Active Tracing](../core/tracer.md#permissions){target="_blank"} in your Lambda function when using this feature, otherwise Lambda cannot send traces to XRay.
106106

107107
=== "getting_started_middleware_tracer_function.py"
108-
```python hl_lines="8 14 15 36"
108+
```python hl_lines="8 14 15 39 40"
109109
--8<-- "examples/middleware_factory/src/getting_started_middleware_tracer_function.py"
110110
```
111111

@@ -134,7 +134,7 @@ In the example below, we create a Middleware with the following features:
134134
* Save execution history to a DynamoDB table
135135

136136
=== "combining_powertools_utilities_function.py"
137-
```python hl_lines="11 28 29 119 52 61 73"
137+
```python hl_lines="11 28 29 56 64 77 123"
138138
--8<-- "examples/middleware_factory/src/combining_powertools_utilities_function.py"
139139
```
140140

examples/middleware_factory/src/advanced_middleware_tracer_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@lambda_handler_decorator(trace_execution=True)
1717
def middleware_with_advanced_tracing(
18-
handler: Callable[[dict, LambdaContext]],
18+
handler: Callable[[dict, LambdaContext], dict],
1919
event: dict,
2020
context: LambdaContext,
2121
) -> dict:

0 commit comments

Comments
 (0)