Unified observability package for Varicon services - logs, traces, and metrics
Project description
Varicon Observability
Unified observability package for logs, traces, and metrics across all Varicon services.
Features
- Universal Log Capture: Captures all logs regardless of how they're created
- Distributed Tracing: Automatic trace correlation across services
- Metrics: System telemetry and performance metrics
- Zero Code Changes: Works with existing logging code
- Framework Support: Auto-detects and instruments Django, FastAPI, Celery
Installation
From Local Source (Development)
cd varicon_observability
pip install -e .
# Or with optional dependencies
pip install -e ".[full]"
From Git Repository
pip install git+https://github.com/your-org/varicon-observability.git
# With optional dependencies
pip install "git+https://github.com/your-org/varicon-observability.git#egg=varicon-observability[full]"
Build and Install from Source
cd varicon_observability
python -m build
pip install dist/varicon_observability-*.whl
Installation Options
- Basic:
pip install varicon-observability - Django:
pip install varicon-observability[django] - FastAPI:
pip install varicon-observability[fastapi] - Celery:
pip install varicon-observability[celery] - Full:
pip install varicon-observability[full]
Quick Start
Django (varicon)
# varicon/varicon/asgi.py or settings.py
from varicon_observability import setup_observability
setup_observability(service_name="varicon-django")
FastAPI (integrations_service)
# integrations_service/main.py
from varicon_observability import setup_observability
setup_observability(service_name="integration-service")
Configuration
Set environment variables:
OTEL_ENABLED=true
OTEL_SERVICE_NAME=my-service
OTEL_EXPORTER_OTLP_ENDPOINT=http://signoz-otel-collector:4318
OTEL_EXPORTER_OTLP_PROTOCOL=grpc # or http
OTEL_EXPORTER_OTLP_HEADERS=signoz-ingestion-key=your-key
OTEL_METRIC_EXPORT_INTERVAL=60000 # Export metrics every 60 seconds (ms)
What Gets Captured
- All Python logging (
logging.getLogger(),IntegrationLogger(), etc.) - Framework logs (Django, FastAPI, Uvicorn, Celery)
- HTTP requests (requests, httpx)
- Database queries (PostgreSQL via psycopg2)
- Redis operations
- Custom traces and metrics
Custom Metrics
Create custom metrics for Signoz using get_meter() or the built-in helpers:
from varicon_observability import setup_observability, get_meter, get_request_counter
setup_observability(service_name="my-service")
# Option 1: Use get_meter() for full control
meter = get_meter()
my_counter = meter.create_counter("custom.events", unit="1", description="Custom events")
my_counter.add(1, {"event_type": "signup"})
# Option 2: Use built-in helpers
request_counter = get_request_counter()
request_counter.add(1, {"endpoint": "/api/users"})
Note: SQLAlchemy logs are disabled by default (set ENABLE_SQLALCHEMY_LOGS=true to enable)
Architecture
Application Code
↓
Python Logging (any pattern)
↓
Root Logger Handler
↓
OpenTelemetry LoggingHandler
↓
OTLP Exporter
↓
SigNoz
All logs automatically include trace context for correlation.
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 varicon_observability-1.2.19.tar.gz.
File metadata
- Download URL: varicon_observability-1.2.19.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca716a93d53f7b080d878508da165afa6a26c19107fe809b9046b3654c916bd
|
|
| MD5 |
4b4a89aca6d22be0b6633306fac23a9d
|
|
| BLAKE2b-256 |
d656464e89c499a6f49175832c987268bb7d4b355b54e11fb7f48ab8ab271022
|
File details
Details for the file varicon_observability-1.2.19-py3-none-any.whl.
File metadata
- Download URL: varicon_observability-1.2.19-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
375ac00eaeee781fd80014ea04a6a63ab1ea9c5bcd247d5ba1a7f133b0f389d6
|
|
| MD5 |
06a3d54ecf10049e8d58b215831dc1f4
|
|
| BLAKE2b-256 |
a399a2ae58e60eed55009c7e5a2a26a4b8bd54b965108a68f967da9ad9e0580e
|