Logs tracing information on a per-request basis
Project description
Flask-Tracy
Flask-Tracy is an extension to Flask that logs tracing information per request.
Time, url, client IP, client name, transaction ID, and request duration are logged as informational to the tracy logger.
- Configuration:
TRACY_REQURE_CLIENT: (OPTIONAL) configuration boolean used to return a 400 when no client name header (defaults to Trace-ID) is present.
Example:
from flask import Flask from flask.ext.tracy import Tracy app = Flask(__name__) appp.config.from_object('some_file.ini') Tracy(app) @app.route('/') def index() return "Hello World"
Example Log:
2015-09-17 18:15:16,252 url:http://localhost:5000/ client_ip:192.168.100.1 client_name:APP_1 client_id:0be9d830-5d68-11e5-82d5-0242ac11000e duration:0.000363
get Flask-Tracy
Install flask
pip install Flask-Tracy
Download the latest release from Python Package Index or clone the repository
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
Flask-Tracy-0.1.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for Flask_Tracy-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1098c89bba0ab580731f86fe2a5ef81a1155c072e5ec5b8dd52d4a146c618f5 |
|
MD5 | b37a5b3b5b692ea6548360fd9b24dbac |
|
BLAKE2b-256 | dcfd36bd495e5721fbb21584d7907b2dfc1f0c63490a1b885ae7d6394c6bda4b |