Skip to main content

OpenCensus FastAPI Integration

Project description

pypi

Installation

pip install opencensus-ext-fastapi

Usage

from fastapi import FastAPI
from opencensus.ext.fastapi.fastapi_middleware import FastAPIMiddleware

app = FastAPI(__name__)
app.add_middleware(FastAPIMiddleware)

@app.get('/')
def hello():
    return 'Hello World!'

Additional configuration can be provided, please read Customization for a complete reference.

app.add_middleware(
    FastAPIMiddleware,
    excludelist_paths=["paths"],
    excludelist_hostnames=["hostnames"],
    sampler=sampler,
    exporter=exporter,
    propagator=propagator,
)

References

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

opencensus-ext-fastapi-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file opencensus-ext-fastapi-0.1.0.tar.gz.

File metadata

  • Download URL: opencensus-ext-fastapi-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.9

File hashes

Hashes for opencensus-ext-fastapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b63b51b2233a8afc7820ab1f4b13b0c5e63aa86c12c0035f4679709dd1afa0fb
MD5 1d95a05d490c09260e7d1ae30ee695b7
BLAKE2b-256 39fa7be884791975481c1e3a891a2ded94c4f684fb1ecbca9d49162a1ca074a4

See more details on using hashes here.

File details

Details for the file opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.9

File hashes

Hashes for opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed524cdc8c8d479b3b15d155c0b0afbb54ade8c98ae6a179e74b7c8bcd8d8977
MD5 fbba6d40650bb3b8e1b17311b3195289
BLAKE2b-256 2c1b3424a575187e67a9acff7c9b638da3c6907d9821cfb3151861723b3ce397

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