https://github.com/spoqa/aws-xray-flask-middleware
Spoqa flavoured AWS X-Ray middleware for Flask
https://github.com/spoqa/aws-xray-flask-middleware
Last synced: 16 days ago
JSON representation
Spoqa flavoured AWS X-Ray middleware for Flask
- Host: GitHub
- URL: https://github.com/spoqa/aws-xray-flask-middleware
- Owner: spoqa
- License: mit
- Created: 2020-07-10T06:07:15.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T09:00:13.000Z (about 6 years ago)
- Last Synced: 2025-10-25T04:48:50.374Z (9 months ago)
- Language: Python
- Homepage: https://pypi.org/project/spoqa-aws-xray-flask-middleware/
- Size: 29.3 KB
- Stars: 0
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spoqa-aws-xray-flask-middleware
[](LICENSE)
[](https://pypi.org/project/spoqa-aws-xray-flask-middleware/)
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//messages
```
## Usage
Replace `aws_xray_sdk.ext.flask.middleware.XRayMiddleware` with `spoqa_aws_xray_flask_middleware.XRayMiddleware`
```python
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](LICENSE).