auditable tracing for linking requests between services
Project description
# FRL Flask Request Tracer
[](http://travis-ci.org/balanced/petitioners) [](https://pypi.python.org/pypi/petitioners/) [](https://pypi.python.org/pypi/petitioners/) [](https://pypi.python.org/pypi/petitioners/) [](https://pypi.python.org/pypi/petitioners/)
Adds tracing to requests generated by Flask apps.
```python
@petitioners.register_flask_app('X-Request-Trace', 'Trace-')
class FlaskApp(flask.Flask):
pass
```
Requests to the app will now generate response with headers tagged like
```
X-Request-Trace: Trace-123123
```
If this header already exists then it will be appended to like
```
X-Request-Trace: Trace-123123,Trace-123432
```
The current trace value can be accessed from the app via the `petitioner` property
```
import flask
print flask.current_app.petitioner
'[Trace-123123,Trace-123432]'
```
[](http://travis-ci.org/balanced/petitioners) [](https://pypi.python.org/pypi/petitioners/) [](https://pypi.python.org/pypi/petitioners/) [](https://pypi.python.org/pypi/petitioners/) [](https://pypi.python.org/pypi/petitioners/)
Adds tracing to requests generated by Flask apps.
```python
@petitioners.register_flask_app('X-Request-Trace', 'Trace-')
class FlaskApp(flask.Flask):
pass
```
Requests to the app will now generate response with headers tagged like
```
X-Request-Trace: Trace-123123
```
If this header already exists then it will be appended to like
```
X-Request-Trace: Trace-123123,Trace-123432
```
The current trace value can be accessed from the app via the `petitioner` property
```
import flask
print flask.current_app.petitioner
'[Trace-123123,Trace-123432]'
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size petitioners-0.0.1.tar.gz (2.3 kB) | File type Source | Python version None | Upload date | Hashes View |