Metadata-Version: 2.4
Name: django-o11y
Version: 0.2.5
Summary: Comprehensive OpenTelemetry observability for Django with traces, logs, metrics, and profiling
Project-URL: Homepage, https://github.com/adinhodovic/django-o11y
Project-URL: Documentation, https://github.com/adinhodovic/django-o11y
Project-URL: Repository, https://github.com/adinhodovic/django-o11y
Project-URL: Issues, https://github.com/adinhodovic/django-o11y/issues
Author-email: Adin Hodovic <hodovicadin@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: Celery,Django,Logging,Metrics,Observability,OpenTelemetry,Tracing
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.12
Requires-Dist: click>=8.1.7
Requires-Dist: django-prometheus>=2.4.0
Requires-Dist: django-structlog>=10.0.0
Requires-Dist: django>=5.2
Requires-Dist: opentelemetry-api>=1.39.1
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.39.1
Requires-Dist: opentelemetry-instrumentation-django>=0.60b1
Requires-Dist: opentelemetry-sdk>=1.39.1
Requires-Dist: prometheus-client>=0.24.1
Requires-Dist: structlog>=25.5.0
Provides-Extra: all
Requires-Dist: celery>=5.6.2; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-botocore>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-celery>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-psycopg2>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-psycopg>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-redis>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-requests>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-urllib3>=0.60b1; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-urllib>=0.60b1; extra == 'all'
Requires-Dist: pyroscope-io>=1.0.4; extra == 'all'
Requires-Dist: pyroscope-otel>=1.0.0; extra == 'all'
Requires-Dist: rich>=14.3.3; extra == 'all'
Provides-Extra: aws
Requires-Dist: opentelemetry-instrumentation-botocore>=0.60b1; extra == 'aws'
Provides-Extra: celery
Requires-Dist: celery>=5.6.2; extra == 'celery'
Requires-Dist: opentelemetry-instrumentation-celery>=0.60b1; extra == 'celery'
Provides-Extra: dev
Requires-Dist: celery>=5.6.2; extra == 'dev'
Requires-Dist: coverage>=7.13.4; extra == 'dev'
Requires-Dist: django-prometheus>=2.4.0; extra == 'dev'
Requires-Dist: django-stubs>=5.2.9; extra == 'dev'
Requires-Dist: mypy>=1.19.1; extra == 'dev'
Requires-Dist: opentelemetry-instrumentation-redis>=0.60b1; extra == 'dev'
Requires-Dist: opentelemetry-instrumentation-requests>=0.60b1; extra == 'dev'
Requires-Dist: opentelemetry-instrumentation-urllib3>=0.60b1; extra == 'dev'
Requires-Dist: prometheus-client>=0.24.1; extra == 'dev'
Requires-Dist: pylint-django>=2.7.0; extra == 'dev'
Requires-Dist: pylint>=4.0.5; extra == 'dev'
Requires-Dist: pytest-clarity>=1.0.1; extra == 'dev'
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
Requires-Dist: pytest-django>=4.12.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.15.1; extra == 'dev'
Requires-Dist: pytest>=9.0.2; extra == 'dev'
Requires-Dist: redis>=7.2.0; extra == 'dev'
Requires-Dist: requests>=2.32.5; extra == 'dev'
Requires-Dist: ruff>=0.15.2; extra == 'dev'
Requires-Dist: tox-uv>=1.29.0; extra == 'dev'
Requires-Dist: tox>=4.44.0; extra == 'dev'
Requires-Dist: urllib3>=2.6.3; extra == 'dev'
Provides-Extra: dev-logging
Requires-Dist: rich>=14.3.3; extra == 'dev-logging'
Provides-Extra: docs
Requires-Dist: mike>=2.1.3; extra == 'docs'
Requires-Dist: mkdocs-material>=9.7.2; extra == 'docs'
Requires-Dist: mkdocs<2.0,>=1.6.1; extra == 'docs'
Provides-Extra: http
Requires-Dist: opentelemetry-instrumentation-httpx>=0.60b1; extra == 'http'
Requires-Dist: opentelemetry-instrumentation-requests>=0.60b1; extra == 'http'
Requires-Dist: opentelemetry-instrumentation-urllib3>=0.60b1; extra == 'http'
Requires-Dist: opentelemetry-instrumentation-urllib>=0.60b1; extra == 'http'
Provides-Extra: postgres
Requires-Dist: opentelemetry-instrumentation-psycopg2>=0.60b1; extra == 'postgres'
Requires-Dist: opentelemetry-instrumentation-psycopg>=0.60b1; extra == 'postgres'
Provides-Extra: profiling
Requires-Dist: pyroscope-io>=1.0.4; extra == 'profiling'
Requires-Dist: pyroscope-otel>=1.0.0; extra == 'profiling'
Provides-Extra: redis
Requires-Dist: opentelemetry-instrumentation-redis>=0.60b1; extra == 'redis'
Description-Content-Type: text/markdown

# Django O11y

[![Test](https://github.com/adinhodovic/django-o11y/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/adinhodovic/django-o11y/actions/workflows/ci-cd.yml)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/django-o11y.svg)](https://pypi.org/project/django-o11y/)
[![PyPI Version](https://img.shields.io/pypi/v/django-o11y.svg?style=flat)](https://pypi.org/project/django-o11y/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Opinionated, off-the-shelf observability for Django. Drop it in and get traces, structured logs, metrics, and profiling wired up with sensible defaults.

## Features

- OpenTelemetry traces for requests, database queries, cache, and Celery tasks
- Structlog with colorized dev output, JSON production logs, and automatic trace correlation
- django-prometheus for infrastructure metrics and a simple API for custom business metrics
- Pyroscope continuous profiling
- Full Celery observability: tracing, structured logs, and metrics
- Pre-built Grafana dashboards
- Sensible defaults, overridable via Django settings or environment variables
- Management command to spin up a local observability stack for testing

## Background

This package bundles the patterns from these blog posts into an installable library:

- [Django Monitoring with Prometheus and Grafana](https://hodovi.cc/blog/django-monitoring-with-prometheus-and-grafana/)
- [Django Development and Production Logging](https://hodovi.cc/blog/django-development-and-production-logging/)
- [Celery Monitoring with Prometheus and Grafana](https://hodovi.cc/blog/celery-monitoring-with-prometheus-and-grafana/)

## Documentation

To learn more about django-o11y, go to the [complete documentation](https://adinhodovic.github.io/django-o11y/).

- [Usage Guide](https://adinhodovic.github.io/django-o11y/usage/)
- [Configuration Reference](https://adinhodovic.github.io/django-o11y/configuration/)

## License

Apache 2.0 - see [LICENSE](LICENSE)
