Fastapi Middleware to work with skywalking
Project description
Wrapper para trabalhar com a API do Cloud Logging
Procedimento para upload no Pypi
Pré requisitos
Instalar pacotes python
python3 -m pip install --upgrade setuptools build wheel twine
Build e enviar ao PYPI
python3 -m build
python3 -m twine upload dist/*
Instalar o pacote no projeto
pip install fastapi-skywalking-trace
Utilização da biblioteca
Essa biblioteca espera que você passe o schema dos dados da tabela
Aconselho criar um arquivo de schema.py ou model.py onde seja definido a estrutura de dados da tabela.
Instanciar o Middleware
Com o schema definido, você deve instanciar um classe
from starlette.middleware import Middleware
from fastapi_skywalking_trace.middleware import SkywalkingMiddleware
middlewares = [
Middleware(
SkywalkingMiddleware,
service_name='extractor',
collector_address='35.266.138.244:15870',
protocol = 'http'
)
]
app = FastAPI(
title='Iris Typification',
openapi_url="/api/v1/openapi.json",
middleware=middlewares
)
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
Built Distribution
Close
Hashes for fastapi-skywalking-trace-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c6a5aa3ecd3b653a8d80570a1a6420edbf07fd5415ed4996b041c3952259e8 |
|
MD5 | f0b63aea2f7575e73ee41d06f4172c78 |
|
BLAKE2b-256 | 78d7470ea4fcaabf6c62d544bfeb42e8e970b86f9a95dafd8f72b01cfc63d3f2 |
Close
Hashes for fastapi_skywalking_trace-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4da50e1f566c5f0080933b3dd47ce2baf1ef21ebc1eae01ebea02c9782955932 |
|
MD5 | 2fa2f3789fada5afc1852e8a8e6d365a |
|
BLAKE2b-256 | b0861646fc7b71ced875f3d6025e2099591c3cf05cf84c9e8a5cb7118e7fd873 |