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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1e8d5f8b8cf0a312f5b515e4d39bf15bd6a5ae6a8f0ac56fe8ddf133dea0372 |
|
MD5 | 80fbaae08cf3fd50499a04e0be78ef4e |
|
BLAKE2b-256 | cdeaa8e44a2f43f90275db324010114273ad0295c4d91696b192bbe643668146 |