fastapi opentracing middleware works with istio
Project description
fastapi-opentracing
fastapi opentracing middleware works with istio
install:
pip install fastapi-opentracing
example:
from fastapi import FastAPI
import uvicorn
from fastapi_opentracing import get_opentracing_span_headers
from fastapi_opentracing.middleware import OpenTracingMiddleware
app = FastAPI()
app.add_middleware(OpenTracingMiddleware)
@app.get("/")
async def root():
carrier = await get_opentracing_span_headers()
return {'span': carrier}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for fastapi_opentracing-0.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fffd665566f9d2bd8db0883fe0c5acfc4efd261055aae305d489ccb4483b584b |
|
MD5 | 3236217cf07a056928028498b73b6e02 |
|
BLAKE2b-256 | d040b9d8cf06978bf7f626ff29dc42b2816805c73069566e2447eeed46537c39 |