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.3.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e047905cb486d4c2fe10a2fbecaa09859f40a275e23509f814fd889a938532fc |
|
MD5 | 694a228bbe40fd1c32041aadf6c68157 |
|
BLAKE2b-256 | f5f5e6c197bd9c1e8b1a74ed1f27e3897e04b0303b8dd6e1ac11b4697dcd26a2 |