Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_opentracing-0.5.6.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file fastapi_opentracing-0.5.6.tar.gz.

File metadata

  • Download URL: fastapi_opentracing-0.5.6.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.8

File hashes

Hashes for fastapi_opentracing-0.5.6.tar.gz
Algorithm Hash digest
SHA256 58e735102bad1a3d29718a24276e9ac604eaa7303f19de1b69a6e340a7117d32
MD5 6adc2a5e0fb468eec5bd6268a58dd01e
BLAKE2b-256 2f05fbfab0b9f433f03bfd68a6cb9d8a0910a652e66d9342308b85dbc7622b9b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page