Python SDK for sending logs, traces, and metrics to Vigil.
Project description
Vigil Python SDK
Send logs, traces, and metrics to a running Vigil server from Python.
Install
From PyPI:
pip install vigil-observability
From this repository during development:
pip install -e sdk/python
Configure
Run vigil init in your app directory first. It writes the SDK environment values to .env:
VIGIL_BASE_URL=http://localhost:8080
VIGIL_PROJECT_ID=proj_...
VIGIL_INGEST_KEY=vigil_...
Load those values into your process, then create a client:
from vigil_sdk import VigilClient
vigil = VigilClient.from_env()
Send Events
vigil.log("request.completed", message="request completed", attrs={"route": "/health"})
vigil.trace(
"llm.completed",
trace_id="trace-123",
span_id="span-1",
attrs={"total_tokens": 42, "cost_usd": 0.0021},
)
vigil.metric("queue.depth", value=7, unit="count", attrs={"queue": "jobs"})
Use VigilClient(base_url=..., project_id=..., ingest_key=...) if you do not want to configure through environment variables.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vigil_observability-0.1.0.tar.gz.
File metadata
- Download URL: vigil_observability-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6274d1acc39e6b15b4c4daaa9e50d543f128a2603be58ef7df45cd7427213e50
|
|
| MD5 |
399be138c620dd197b5a066e2a0d177e
|
|
| BLAKE2b-256 |
5b93ab441f76f8455143b3db3c0f6b66da6d2242934bbd1225abf02fd0ed5401
|
File details
Details for the file vigil_observability-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vigil_observability-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27fec245a64332e98983ea40f433a3dcc2509b0d3fdc3f9198e5b41290db20fc
|
|
| MD5 |
3137dab8a49973847d34e60be673b307
|
|
| BLAKE2b-256 |
8b2bded4e8bab4dc08bde3037e568c7a56deee5413bcf270c854497bb805915b
|