Business Monitor
Installation
pip install biz-monitor
Usage
Flask
Insert following code after you initialized Flask app instance:
from biz_monitor.biz_tracing.flask_opentracing import init_tracing
from biz_monitor.biz_logging.log import init_logging
init_tracing("service name", "jaeger_agent uri, e.g. localhost:6831", "kafka uri, e.g. localhost:9092", 'IDC', 'set0', 'instance-0', app)
log = init_logging("service name", 'IDC', 'set0', 'instance-0')
Tornado
Insert following code before you initialize tornado.web.Application instance:
from biz_monitor.biz_logging import init_async_logging
from biz_monitor.biz_tracing.tornado_opentracing import init_tracing
init_tracing("service name", "jaeger_agent uri, e.g. localhost:6831", "kafka uri, e.g. localhost:9092", "IDC", "set0", 'instance-0')
log = init_async_logging("service_name", "IDC", "set0", "instance-0")
aiohttp
import aiohttp
import aiohttp.web
from biz_monitor.biz_logging import init_async_logging
from biz_monitor.biz_tracing.aiohttp_opentracing import init_tracing, trace_config
log = init_async_logging("service_name", "IDC", "set0", "instance-0")
metrics_middleware = init_tracing("service_name", "jaeger_agent uri, e.g. localhost:6831", "kafka uri, e.g. localhost:9092", "IDC", "set0", 'instance-0')
# Insert metrics_middleware into application's middlewares
app = aiohttp.web.Application(middlewares=[metrics_middleware, ...])
# Add trace_config to aiohttp.ClientSession
async def fetch():
async with aiohttp.ClientSession(trace_configs=[trace_config]) as session:
async with session.get("http://localhost:5000/demo") as resp:
pass
Description
This project is used for "Metrics, tracing, and logging". It's an integration of python libraries for opentracing, including:
Metadata
Release files for biz-monitor 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| biz_monitor-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for biz_monitor-0.5.0-py3-none-any.whl |
Release files / biz_monitor-0.5.0-py3-none-any.whl
| Download URL | biz_monitor-0.5.0-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34c262b29860fc468379063ce36a227f739ec0d374844fbbf0a8b970653b5d5e
|
|
BLAKE2b-256 checksum How to use checksums |
b1b9dd53ba203ad6e769d07ee5e39962904b9ed0448f70f02d16afb10f8b085a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
|
Security for biz-monitor 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.