You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/event_handler/api_gateway.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -406,10 +406,12 @@ Here's a sample middleware that extracts and injects correlation ID, using `APIG
406
406
```
407
407
408
408
1. You can access current request like you normally would.
409
-
2. [Shared context is available](#sharing-contextual-data) to any middleware, Router and App instances. <br><br> For example, another middleware can now use `app.context.get("correlation_id")` to retrieve it.
410
-
3. Get response from the next middleware (if any) or from `/todos` route.
411
-
4. You can manipulate headers, body, or status code before returning it.
412
-
5. Register one or more middlewares in order of execution.
409
+
2. Logger extracts it first in the request path, so we can use it. <br><br> If this was available before, we'd use `app.context.get("correlation_id")`.
410
+
3. [Shared context is available](#sharing-contextual-data) to any middleware, Router and App instances. <br><br> For example, another middleware can now use `app.context.get("correlation_id")` to retrieve it.
411
+
4. Get response from the next middleware (if any) or from `/todos` route.
412
+
5. You can manipulate headers, body, or status code before returning it.
413
+
6. Register one or more middlewares in order of execution.
414
+
7. Logger extracts correlation ID from header and makes it available under `correlation_id` key, and `get_correlation_id()` method.
0 commit comments