-
Notifications
You must be signed in to change notification settings - Fork 936
Expand file tree
/
Copy pathpyproject.toml
More file actions
245 lines (234 loc) · 11.5 KB
/
pyproject.toml
File metadata and controls
245 lines (234 loc) · 11.5 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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# Used for local development, not to be published.
[project]
name = "opentelemetry-python-contrib"
version = "0.0.0" # This is not used.
requires-python = ">=3.10"
dependencies = [
"opentelemetry-api",
"opentelemetry-sdk",
"opentelemetry-semantic-conventions",
"opentelemetry-instrumentation",
"opentelemetry-distro",
"opentelemetry-test-utils",
"opentelemetry-exporter-prometheus-remote-write",
"opentelemetry-exporter-richconsole",
"opentelemetry-instrumentation-aio-pika[instruments]",
"opentelemetry-instrumentation-aiohttp-client[instruments]",
"opentelemetry-instrumentation-aiohttp-server[instruments]",
"opentelemetry-instrumentation-aiokafka[instruments]",
"opentelemetry-instrumentation-aiopg[instruments]",
"opentelemetry-instrumentation-asgi[instruments]",
"opentelemetry-instrumentation-asyncio",
"opentelemetry-instrumentation-asyncpg[instruments]",
"opentelemetry-instrumentation-aws-lambda[instruments]",
"opentelemetry-instrumentation-boto3sqs[instruments]",
"opentelemetry-instrumentation-botocore[instruments-any]",
"opentelemetry-instrumentation-cassandra[instruments]",
"opentelemetry-instrumentation-celery[instruments]",
"opentelemetry-instrumentation-click[instruments]",
"opentelemetry-instrumentation-confluent-kafka[instruments]",
"opentelemetry-instrumentation-dbapi",
"opentelemetry-instrumentation-django[instruments]",
"opentelemetry-instrumentation-elasticsearch[instruments]",
"opentelemetry-instrumentation-falcon[instruments]",
"opentelemetry-instrumentation-fastapi[instruments]",
"opentelemetry-instrumentation-flask[instruments]",
"opentelemetry-instrumentation-grpc[instruments]",
"opentelemetry-instrumentation-httpx[instruments]",
"opentelemetry-instrumentation-jinja2[instruments]",
"opentelemetry-instrumentation-kafka-python[instruments]",
"opentelemetry-instrumentation-kafka-python[instruments-any]",
"opentelemetry-instrumentation-logging",
"opentelemetry-instrumentation-mysql[instruments]",
"opentelemetry-instrumentation-mysqlclient[instruments]",
"opentelemetry-instrumentation-pika[instruments]",
"opentelemetry-instrumentation-psycopg[instruments]",
"opentelemetry-instrumentation-psycopg2[instruments]",
"opentelemetry-instrumentation-psycopg2[instruments-any]",
"opentelemetry-instrumentation-pymemcache[instruments]",
"opentelemetry-instrumentation-pymongo[instruments]",
"opentelemetry-instrumentation-pymysql[instruments]",
"opentelemetry-instrumentation-pyramid[instruments]",
"opentelemetry-instrumentation-redis[instruments]",
"opentelemetry-instrumentation-remoulade[instruments]",
"opentelemetry-instrumentation-requests[instruments]",
"opentelemetry-instrumentation-sqlalchemy[instruments]",
"opentelemetry-instrumentation-sqlite3",
"opentelemetry-instrumentation-system-metrics",
"opentelemetry-instrumentation-threading",
"opentelemetry-instrumentation-tornado",
"opentelemetry-instrumentation-tortoiseorm[instruments]",
"opentelemetry-instrumentation-urllib",
"opentelemetry-instrumentation-urllib3[instruments]",
"opentelemetry-instrumentation-wsgi",
"opentelemetry-propagator-ot-trace",
"opentelemetry-propagator-aws-xray",
"opentelemetry-util-http",
"opentelemetry-util-genai",
"opentelemetry-instrumentation-vertexai[instruments]",
"opentelemetry-instrumentation-openai-v2[instruments]",
]
# https://docs.astral.sh/uv/reference/settings/
[tool.uv]
package = false # https://docs.astral.sh/uv/reference/settings/#package
required-version = ">=0.6.0"
# https://docs.astral.sh/uv/reference/settings/#sources
[tool.uv.sources]
opentelemetry-api = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "opentelemetry-api" }
opentelemetry-sdk = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "opentelemetry-sdk" }
opentelemetry-semantic-conventions = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "opentelemetry-semantic-conventions" }
opentelemetry-test-utils = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "tests/opentelemetry-test-utils" }
opentelemetry-exporter-otlp = { git = "https://github.com/open-telemetry/opentelemetry-python", branch = "main", subdirectory = "exporter/opentelemetry-exporter-otlp" }
opentelemetry-instrumentation = { workspace = true }
opentelemetry-distro = { workspace = true }
opentelemetry-exporter-prometheus-remote-write = { workspace = true }
opentelemetry-exporter-richconsole = { workspace = true }
opentelemetry-instrumentation-aio-pika = { workspace = true }
opentelemetry-instrumentation-aiohttp-client = { workspace = true }
opentelemetry-instrumentation-aiohttp-server = { workspace = true }
opentelemetry-instrumentation-aiokafka = { workspace = true }
opentelemetry-instrumentation-aiopg = { workspace = true }
opentelemetry-instrumentation-asgi = { workspace = true }
opentelemetry-instrumentation-asyncio = { workspace = true }
opentelemetry-instrumentation-asyncpg = { workspace = true }
opentelemetry-instrumentation-aws-lambda = { workspace = true }
opentelemetry-instrumentation-boto3sqs = { workspace = true }
opentelemetry-instrumentation-botocore = { workspace = true }
opentelemetry-instrumentation-cassandra = { workspace = true }
opentelemetry-instrumentation-celery = { workspace = true }
opentelemetry-instrumentation-click = { workspace = true }
opentelemetry-instrumentation-confluent-kafka = { workspace = true }
opentelemetry-instrumentation-dbapi = { workspace = true }
opentelemetry-instrumentation-django = { workspace = true }
opentelemetry-instrumentation-elasticsearch = { workspace = true }
opentelemetry-instrumentation-falcon = { workspace = true }
opentelemetry-instrumentation-fastapi = { workspace = true }
opentelemetry-instrumentation-flask = { workspace = true }
opentelemetry-instrumentation-grpc = { workspace = true }
opentelemetry-instrumentation-httpx = { workspace = true }
opentelemetry-instrumentation-jinja2 = { workspace = true }
opentelemetry-instrumentation-kafka-python = { workspace = true }
opentelemetry-instrumentation-logging = { workspace = true }
opentelemetry-instrumentation-mysql = { workspace = true }
opentelemetry-instrumentation-mysqlclient = { workspace = true }
opentelemetry-instrumentation-pika = { workspace = true }
opentelemetry-instrumentation-psycopg = { workspace = true }
opentelemetry-instrumentation-psycopg2 = { workspace = true }
opentelemetry-instrumentation-pymemcache = { workspace = true }
opentelemetry-instrumentation-pymongo = { workspace = true }
opentelemetry-instrumentation-pymysql = { workspace = true }
opentelemetry-instrumentation-pyramid = { workspace = true }
opentelemetry-instrumentation-redis = { workspace = true }
opentelemetry-instrumentation-remoulade = { workspace = true }
opentelemetry-instrumentation-requests = { workspace = true }
opentelemetry-instrumentation-sqlalchemy = { workspace = true }
opentelemetry-instrumentation-sqlite3 = { workspace = true }
opentelemetry-instrumentation-system-metrics = { workspace = true }
opentelemetry-instrumentation-threading = { workspace = true }
opentelemetry-instrumentation-tornado = { workspace = true }
opentelemetry-instrumentation-tortoiseorm = { workspace = true }
opentelemetry-instrumentation-urllib = { workspace = true }
opentelemetry-instrumentation-urllib3 = { workspace = true }
opentelemetry-instrumentation-wsgi = { workspace = true }
opentelemetry-propagator-ot-trace = { workspace = true }
opentelemetry-propagator-aws-xray = { workspace = true }
opentelemetry-util-http = { workspace = true }
opentelemetry-util-genai = { workspace = true }
opentelemetry-instrumentation-vertexai = { workspace = true }
opentelemetry-instrumentation-openai-v2 = { workspace = true }
# https://docs.astral.sh/uv/reference/settings/#workspace
[tool.uv.workspace]
members = [
"instrumentation/*",
"instrumentation-genai/*",
"exporter/*",
"opentelemetry-instrumentation",
"opentelemetry-distro",
"propagator/*",
"util/*",
]
[tool.ruff]
# https://docs.astral.sh/ruff/configuration/
target-version = "py310"
line-length = 79
extend-exclude = ["_template", "*_pb2*.py*"]
output-format = "concise"
[tool.ruff.lint]
# https://docs.astral.sh/ruff/linter/#rule-selection
# pylint: https://github.com/astral-sh/ruff/issues/970
select = [
"I", # isort
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"PLC", # pylint convention
"PLE", # pylint error
"Q", # flake8-quotes
"A", # flake8-builtins
"TID", # flake8-tidy-imports
]
ignore = [
"E501", # line-too-long
]
[tool.ruff.lint.per-file-ignores]
"docs/**/*.*" = ["A001"]
"instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/*" = ["TID252"]
[tool.ruff.lint.isort]
detect-same-package = false # to not consider instrumentation packages as first-party
known-first-party = ["opentelemetry"]
known-third-party = [
"psutil",
"pytest",
"redis",
"redis_opentracing",
"opencensus",
]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#type-check-rule-overrides
[tool.pyright]
typeCheckingMode = "strict"
reportUnnecessaryTypeIgnoreComment = true
reportMissingTypeStubs = false
pythonVersion = "3.10"
reportPrivateUsage = false # Ignore private attributes added by instrumentation packages.
# Add progressively instrumentation packages here.
include = [
"instrumentation/opentelemetry-instrumentation-aiokafka",
"instrumentation/opentelemetry-instrumentation-asyncclick",
"instrumentation/opentelemetry-instrumentation-threading",
"instrumentation-genai/opentelemetry-instrumentation-anthropic",
"instrumentation-genai/opentelemetry-instrumentation-claude-agent-sdk",
"instrumentation-genai/opentelemetry-instrumentation-vertexai",
"instrumentation-genai/opentelemetry-instrumentation-langchain",
"instrumentation-genai/opentelemetry-instrumentation-weaviate",
"util/opentelemetry-util-genai",
"exporter/opentelemetry-exporter-credential-provider-gcp",
"instrumentation/opentelemetry-instrumentation-aiohttp-client",
"opamp/opentelemetry-opamp-client",
]
# We should also add type hints to the test suite - It helps on finding bugs.
# We are excluding for now because it's easier, and more important to add to the instrumentation packages.
exclude = [
"instrumentation/opentelemetry-instrumentation-aiokafka/tests/**/*.py",
"instrumentation/opentelemetry-instrumentation-asyncclick/tests/**/*.py",
"instrumentation/opentelemetry-instrumentation-threading/tests/**",
"instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-anthropic/examples/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-claude-agent-sdk/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-claude-agent-sdk/examples/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-vertexai/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-langchain/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-langchain/examples/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-weaviate/tests/**/*.py",
"instrumentation-genai/opentelemetry-instrumentation-weaviate/examples/**/*.py",
"util/opentelemetry-util-genai/tests/**/*.py",
"instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/**/*.py",
"opamp/opentelemetry-opamp-client/tests/**/*.py",
"opamp/opentelemetry-opamp-client/src/opentelemetry/**/proto/**",
]
[dependency-groups]
dev = [
"tox",
"tox-uv>=1",
"pre-commit",
]