Skip to main content

Spoqa flavoured AWS X-Ray middleware for Flask

Project description

spoqa-aws-xray-flask-middleware

License PyPI

Spoqa flavoured AWS X-Ray middleware for Flask

Before:

https://example.com/api/12345/messages
http://localhost:8000/api/32123/messages
http://127.0.0.1/api/43434/messages
...

After:

//service_name/api/<int:id>/messages

Usage

Replace aws_xray_sdk.ext.flask.middleware.XRayMiddleware with spoqa_aws_xray_flask_middleware.XRayMiddleware

from aws_xray_sdk.core import xray_recorder
from spoqa_aws_xray_flask_middleware import XRayMiddleware

app = Flask(__name__)

xray_recorder.configure(service='fallback_name', dynamic_naming='*mysite.com*')
XRayMiddleware(app, xray_recorder)

License

spoqa-aws-xray-flask-middleware is licensed under the terms of MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spoqa_aws_xray_flask_middleware-0.1.2.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

spoqa_aws_xray_flask_middleware-0.1.2-py2.py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page