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
Metadata
Release files for opencensus-ext-fastapi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opencensus-ext-fastapi-0.1.0.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 9.0 kB
Release files / opencensus-ext-fastapi-0.1.0.tar.gz
| Download URL | opencensus-ext-fastapi-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b63b51b2233a8afc7820ab1f4b13b0c5e63aa86c12c0035f4679709dd1afa0fb
|
|
BLAKE2b-256 checksum How to use checksums |
39fa7be884791975481c1e3a891a2ded94c4f684fb1ecbca9d49162a1ca074a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl
| Download URL | opencensus_ext_fastapi-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ed524cdc8c8d479b3b15d155c0b0afbb54ade8c98ae6a179e74b7c8bcd8d8977
|
|
BLAKE2b-256 checksum How to use checksums |
2c1b3424a575187e67a9acff7c9b638da3c6907d9821cfb3151861723b3ce397
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|