Skip to content

Commit

Permalink
adding patching (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
P0NDER0SA authored Aug 29, 2024
1 parent 71ca4c2 commit e46b6d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from apig_wsgi import make_lambda_handler
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.core import patch_all, xray_recorder
from aws_xray_sdk.ext.flask.middleware import XRayMiddleware
from dotenv import load_dotenv
from flask import Flask
Expand All @@ -11,6 +11,9 @@
from app import create_app

load_dotenv()
# Patch all supported libraries for X-Ray
# Used to trace requests and responses through the stack
patch_all()

application = Flask("app")
application.wsgi_app = ProxyFix(application.wsgi_app) # type: ignore
Expand Down

0 comments on commit e46b6d8

Please sign in to comment.