-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (199 loc) · 5.53 KB
/
pyproject.toml
File metadata and controls
228 lines (199 loc) · 5.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/django_o11y"]
[project]
name = "django-o11y"
version = "0.7.2"
description = "Comprehensive OpenTelemetry observability for Django with traces, logs, metrics, and profiling"
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
keywords = [
"Django",
"OpenTelemetry",
"Observability",
"Tracing",
"Logging",
"Metrics",
"Celery",
]
authors = [{ name = "Adin Hodovic", email = "hodovicadin@gmail.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Monitoring",
"Topic :: System :: Logging",
]
dependencies = [
"Django>=5.2",
"opentelemetry-api>=1.39.1",
"opentelemetry-sdk>=1.39.1",
"opentelemetry-instrumentation-django>=0.60b1",
"opentelemetry-exporter-otlp-proto-grpc>=1.39.1",
"structlog>=25.5.0",
"django-structlog>=10.0.0",
"click>=8.1.7",
"django-prometheus>=2.4.0",
"prometheus-client>=0.24.1",
]
[project.optional-dependencies]
# Celery support
celery = [
"celery>=5.6.2",
"django-structlog[celery]>=10.0.0",
"opentelemetry-instrumentation-celery>=0.60b1",
]
# Profiling support (push mode - optional)
profiling = ["pyroscope-io>=1.0.4", "pyroscope-otel>=1.0.0"]
# Database instrumentation
postgres = [
"opentelemetry-instrumentation-psycopg2>=0.60b1",
"opentelemetry-instrumentation-psycopg>=0.60b1", # psycopg v3
]
# SQLite instrumentation
sqlite = ["opentelemetry-instrumentation-sqlite3>=0.60b1"]
# MySQL instrumentation
mysql = ["pymysql>=1.1.0", "opentelemetry-instrumentation-pymysql>=0.60b1"]
# Cache instrumentation
redis = [
"redis>=7.2.0",
"django-redis>=5.4.0",
"opentelemetry-instrumentation-redis>=0.60b1",
]
# HTTP client instrumentation
http = [
"opentelemetry-instrumentation-requests>=0.60b1",
"opentelemetry-instrumentation-urllib3>=0.60b1",
"opentelemetry-instrumentation-urllib>=0.60b1",
"opentelemetry-instrumentation-httpx>=0.60b1",
]
# AWS SDK (boto3/botocore) instrumentation — opt-in via TRACING.AWS_ENABLED
aws = ["opentelemetry-instrumentation-botocore>=0.60b1"]
# Django Channels WebSocket observability
channels = ["channels[daphne]>=4.0.0"]
# Beautiful dev logs
dev-logging = ["rich>=14.3.3"]
# All features
all = [
"django-o11y[celery,profiling,postgres,sqlite,mysql,redis,http,aws,channels,dev-logging]",
]
# Documentation
docs = ["zensical"]
# Development dependencies
dev = [
"ruff>=0.15.2",
"tox>=4.44.0",
"tox-uv>=1.29.0",
"coverage>=7.13.4",
"django-stubs>=5.2.9",
"mypy>=1.19.1",
"pylint>=4.0.5",
"pylint-django>=2.7.0",
"prek>=0.3.4",
"pytest>=9.0.2",
"pytest-cov>=7.0.0",
"pytest-django>=4.12.0",
"pytest-clarity>=1.0.1",
"pytest-mock>=3.15.1",
"django-prometheus>=2.4.0",
"prometheus-client>=0.24.1",
"celery>=5.6.2",
"redis>=7.2.0",
"opentelemetry-instrumentation-redis>=0.60b1",
"opentelemetry-instrumentation-requests>=0.60b1",
"opentelemetry-instrumentation-urllib3>=0.60b1",
"opentelemetry-instrumentation-urllib>=0.60b1",
"opentelemetry-instrumentation-sqlite3>=0.60b1",
"requests>=2.32.5",
"urllib3>=2.6.3",
"chardet<6",
]
[project.urls]
Homepage = "https://github.com/adinhodovic/django-o11y"
Documentation = "https://github.com/adinhodovic/django-o11y"
Repository = "https://github.com/adinhodovic/django-o11y"
Issues = "https://github.com/adinhodovic/django-o11y/issues"
[tool.pytest.ini_options]
addopts = "--ds=tests.config.settings.test --reuse-db"
python_files = "tests.py test_*.py"
norecursedirs = ".git */migrations/* */static/* venv .venv .virtualenv node_modules .tox"
markers = [
"integration: marks tests as integration tests that require Docker stack (deselect with '-m \"not integration\"')",
]
[tool.ruff]
line-length = 88
target-version = "py312"
exclude = [
".venv",
"venv",
"virtualenv",
"migrations",
"node_modules",
".tox",
"examples",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = []
[tool.ruff.lint.isort]
known-first-party = ["django_o11y"]
[tool.mypy]
python_version = "3.13"
check_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
plugins = ["mypy_django_plugin.main"]
exclude = [".venv", "migrations.*", "examples"]
[tool.django-stubs]
django_settings_module = "tests.config.settings.test"
[tool.pylint.'MASTER']
load-plugins = "pylint_django"
ignore = "manage.py"
[tool.pylint.'FORMAT']
max-line-length = 150
[tool.pylint.'MESSAGES CONTROL']
disable = """
missing-docstring,
invalid-name,
logging-fstring-interpolation,
fixme,
duplicate-code,
import-outside-toplevel,
too-few-public-methods,
broad-exception-caught,
global-statement,
redefined-outer-name,
not-context-manager,
unused-argument,
protected-access
"""
[tool.pylint.'DESIGN']
max-parents = 13
[tool.coverage.run]
branch = true
source = ["django_o11y"]
omit = ["./.venv/*", "*/migrations/*", "*/apps.py", "*/tests/*"]
[tool.coverage.report]
fail_under = 75