Skip to main content

fastapi opentracing middleware works with istio

Project description

fastapi-opentracing

fastapi opentracing middleware works with istio

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.1.tar.gz (4.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: fastapi_opentracing-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.8

File hashes

Hashes for fastapi_opentracing-0.1.tar.gz
Algorithm Hash digest
SHA256 9bfac199caa814894d79eed571d49d32e1fbab4ee5a9a0c8401d857b12ecfc56
MD5 c95fa6a904b087095dc431b50d71fcea
BLAKE2b-256 b93f7ae0352beaeb4423768f4d5efdf8a9ba97c36dd947fd0573a2bf776f30a1

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