Metadata-Version: 2.4
Name: django-ansible-observability
Version: 0.1.2
Summary: Django application for Ansible observability with OpenTelemetry integration
Author-email: Chris Meyers <chris.meyers.fsu@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/chrismeyersfsu/django-ansible-observability
Project-URL: Repository, https://github.com/chrismeyersfsu/django-ansible-observability
Project-URL: Issues, https://github.com/chrismeyersfsu/django-ansible-observability/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: Django<4.3.0,>=4.2.21
Requires-Dist: opentelemetry-api
Requires-Dist: opentelemetry-sdk
Requires-Dist: opentelemetry-instrumentation-django
Requires-Dist: opentelemetry-instrumentation-grpc
Requires-Dist: opentelemetry-instrumentation-psycopg
Requires-Dist: opentelemetry-instrumentation-psycopg2
Requires-Dist: opentelemetry-instrumentation-requests
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc
Requires-Dist: opentelemetry-exporter-richconsole
Requires-Dist: requests
Requires-Dist: psycopg
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-django; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Provides-Extra: psycopg2
Requires-Dist: psycopg2; extra == "psycopg2"

# Django Ansible Observability

```
pip3 -m venv .venv
pip install -e .
python manage.py runserver
```

`http://localhost:8000`

This should output something like the text below. The trace is showing on your console because of the Django setting `ANSIBLE_OBSERVE_OUTPUT_SPAN_TO_CONSOLE = True`.

```
[08/Aug/2025 15:31:22] "GET / HTTP/1.1" 200 43
Trace beffbf37476957dea79abb858553191a
└── [20:31:22.510739] GET index, span c29749adb0de6a7e
    ├── Kind : SERVER
    ├── Attributes :
    │   ├── http.method : GET
    │   ├── http.server_name : localhost.localdomain
    │   ├── http.scheme : http
    │   ├── net.host.name : localhost:8000
    │   ├── http.host : localhost:8000
    │   ├── net.host.port : 8000
    │   ├── http.url : http://localhost:8000/
    │   ├── net.peer.ip : 127.0.0.1
    │   ├── http.user_agent : Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
    │   ├── http.flavor : 1.1
    │   └── http.status_code : 200
    └── Resources :
        └── service.name : aap-generic
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to localhost:4317, retrying in 1.15s.
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to localhost:4317, retrying in 2.02s.
Transient error StatusCode.UNAVAILABLE encountered while exporting traces to localhost:4317, retrying in 4.76s.
Failed to export traces to localhost:4317, error code: StatusCode.UNAVAILABLE
```
