Skip to main content

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
  • Async DB spans: instrument_sqlalchemy() traces SQLAlchemy + asyncpg engines (psycopg2 auto-instrumentation doesn't cover async)
  • Content redaction: strips LLM prompt/response content (ADK / GenAI-semconv / OpenInference / Traceloop) from spans before export — on by default, fails closed
  • Local span inspection: dump spans to an NDJSON file (OTEL_SPAN_FILE_EXPORT) and run in file-only mode with no backend

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]
  • AWS platform attributes: pip install varicon-observability[aws] — adds cloud.platform, aws.ecs.* and friends to the Resource. Not included by [django]/[fastapi]/[celery]; already in [full]. Without it, platform detection is a silent no-op rather than an error.
  • 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_SERVICE_VERSION=v1.2.3-4-gabc1234  # build id; defaults to "unset" (see below)
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)

# Span filtering (independent)
OTEL_FILTER_DATABASE_SPANS=true       # set false to KEEP DB spans (asyncpg DB observability)
OTEL_FILTER_HEALTH_CHECK_SPANS=true   # drop health-check spans, independent of DB filtering
OTEL_FILTER_EMPTY_QUEUE_POLLS=true    # drop SQS ReceiveMessage spans that succeeded and returned nothing
                                      # (failed polls and polls that returned work are always kept)
OTEL_FILTER_UNATTRIBUTED_ROOT_PROBE=true  # drop the `HEAD /` probe (17% of prod server spans).
                                      # NOT a health check - separate flag on purpose

# Log export floor (cost control; OTLP path only)
OTEL_LOG_SEVERITY_FLOOR=INFO          # minimum severity EXPORTED. DEBUG|INFO|WARN|WARNING|ERROR|CRITICAL.
                                      # Set WARNING in prod: ~75% of the log bill, and console/CloudWatch
                                      # still see everything. Unrecognised values fall back to INFO.

# LLM/agent content redaction (on by default, fails closed)
OTEL_REDACT_SPAN_CONTENT=true
OTEL_REDACT_SPAN_ATTRIBUTES=          # extra content attribute keys, comma-separated

# Local inspection: dump spans to NDJSON; enables file-only mode with no OTLP endpoint
OTEL_SPAN_FILE_EXPORT=                # e.g. /tmp/spans.ndjson

service.version

Prefer the parameter over the env var when the value comes from application code:

setup_observability(service_name="my-service", version=settings.APP_VERSION)

ObservabilityConfig reads OTEL_SERVICE_VERSION from the environment once, at import time. So os.environ["OTEL_SERVICE_VERSION"] = ... in your startup path is silently ignored whenever this package was imported earlier in the process — which, in a Django app, it usually was. The parameter assigns the class attribute that resource_attributes() reads at provider-build time, exactly as service_name= already does.

The default is "unset", not a version-shaped placeholder. A default like 1.0.0 is indistinguishable from a genuinely versioned service, so service.version looks populated while telling you nothing — which is how the Varicon monolith ran unversioned across every tier unnoticed (VDP-1656). If you see unset in Honeycomb, that service is not passing a build id.

An empty or whitespace-only OTEL_SERVICE_VERSION also falls back to "unset" rather than shipping blank, since --build-arg FOO=""-style plumbing sets the variable without giving it a value.

See EXAMPLES.md for instrument_sqlalchemy(), content redaction, and local span inspection.

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; SQLAlchemy + asyncpg via instrument_sqlalchemy())
  • 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.

Metadata

Release files for varicon-observability 1.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for varicon-observability 1.11.0
File Size Uploaded Provenance Actions
varicon_observability-1.11.0.tar.gz 217.2 kB Without provenance Details for varicon_observability-1.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for varicon-observability 1.11.0
File Interpreter ABI Platform Actions
varicon_observability-1.11.0-py3-none-any.whl Python 3 none any Details for varicon_observability-1.11.0-py3-none-any.whl

Total release size: 344.5 kB

Release files / varicon_observability-1.11.0.tar.gz

Download URL varicon_observability-1.11.0.tar.gz
Size 217.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2ca94b3b1f7d2ac6103ac4857b7f20732b7ed9bf7d440c92b1d4e4171e525be2
BLAKE2b-256 checksum
How to use checksums
6ea0d577bf0573ea1ea02ecae1ca28f0adcc3214ae2f4359e9f76154ee192e3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / varicon_observability-1.11.0-py3-none-any.whl

Download URL varicon_observability-1.11.0-py3-none-any.whl
Size 127.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10a8a35aaf2ed669e2a8c46127f1d7336a1e83fb2a7ea06aaf1af5b9038cb81a
BLAKE2b-256 checksum
How to use checksums
fc9f03a81a07c7f67fc2143fd1e9518bbd95330e66727fba09fe3d22af7f05ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for varicon-observability 1.11.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.

Release history Release notifications | RSS feed

This release

1.11.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page