Skip to content

Commit 449ade4

Browse files
authored
Merge branch 'master' into prop
2 parents 1d0db15 + 3b48a38 commit 449ade4

File tree

6 files changed

+49
-16
lines changed

6 files changed

+49
-16
lines changed

.github/workflows/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ on:
66
- 'release/*'
77
pull_request:
88
env:
9-
CORE_REPO_SHA: df6e6ae543df3e3c7d90be851e8e47807006c4e9
9+
CORE_REPO_SHA: f69e12fba8d0afd587dd21adbedfe751153aa73c
10+
1011

1112
jobs:
1213
build:

exporter/opentelemetry-exporter-prometheus-remote-write/setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ package_dir=
3939
=src
4040
packages=find_namespace:
4141
install_requires =
42-
opentelemetry-api == 0.16.dev0
43-
opentelemetry-sdk == 0.16.dev0
42+
opentelemetry-api == 0.17.dev0
43+
opentelemetry-sdk == 0.17.dev0
4444

4545
[options.packages.find]
4646
where = src

instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def test_traced_get(self):
144144
self.assertEqual(span.attributes["http.status_text"], "OK")
145145

146146
self.assertIsNotNone(_django_instrumentor.meter)
147-
self.assertEqual(len(_django_instrumentor.meter.metrics), 1)
148-
recorder = _django_instrumentor.meter.metrics.pop()
147+
self.assertEqual(len(_django_instrumentor.meter.instruments), 1)
148+
recorder = list(_django_instrumentor.meter.instruments.values())[0]
149149
match_key = get_dict_as_key(
150150
{
151151
"http.flavor": "1.1",
@@ -222,15 +222,15 @@ def test_error(self):
222222
self.assertEqual(span.attributes["http.scheme"], "http")
223223
self.assertEqual(span.attributes["http.status_code"], 500)
224224
self.assertIsNotNone(_django_instrumentor.meter)
225-
self.assertEqual(len(_django_instrumentor.meter.metrics), 1)
225+
self.assertEqual(len(_django_instrumentor.meter.instruments), 1)
226226

227227
self.assertEqual(len(span.events), 1)
228228
event = span.events[0]
229229
self.assertEqual(event.name, "exception")
230230
self.assertEqual(event.attributes["exception.type"], "ValueError")
231231
self.assertEqual(event.attributes["exception.message"], "error")
232232

233-
recorder = _django_instrumentor.meter.metrics.pop()
233+
recorder = list(_django_instrumentor.meter.instruments.values())[0]
234234
match_key = get_dict_as_key(
235235
{
236236
"http.flavor": "1.1",

instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def test_basic(self):
8888
)
8989

9090
self.assertIsNotNone(RequestsInstrumentor().meter)
91-
self.assertEqual(len(RequestsInstrumentor().meter.metrics), 1)
92-
recorder = RequestsInstrumentor().meter.metrics.pop()
91+
self.assertEqual(len(RequestsInstrumentor().meter.instruments), 1)
92+
recorder = list(RequestsInstrumentor().meter.instruments.values())[0]
9393
match_key = get_dict_as_key(
9494
{
9595
"http.flavor": "1.1",
@@ -287,8 +287,8 @@ def test_requests_exception_without_response(self, *_, **__):
287287
self.assertEqual(span.status.status_code, StatusCode.ERROR)
288288

289289
self.assertIsNotNone(RequestsInstrumentor().meter)
290-
self.assertEqual(len(RequestsInstrumentor().meter.metrics), 1)
291-
recorder = RequestsInstrumentor().meter.metrics.pop()
290+
self.assertEqual(len(RequestsInstrumentor().meter.instruments), 1)
291+
recorder = list(RequestsInstrumentor().meter.instruments.values())[0]
292292
match_key = get_dict_as_key(
293293
{
294294
"http.method": "GET",
@@ -328,8 +328,8 @@ def test_requests_exception_with_response(self, *_, **__):
328328
)
329329
self.assertEqual(span.status.status_code, StatusCode.ERROR)
330330
self.assertIsNotNone(RequestsInstrumentor().meter)
331-
self.assertEqual(len(RequestsInstrumentor().meter.metrics), 1)
332-
recorder = RequestsInstrumentor().meter.metrics.pop()
331+
self.assertEqual(len(RequestsInstrumentor().meter.instruments), 1)
332+
recorder = list(RequestsInstrumentor().meter.instruments.values())[0]
333333
match_key = get_dict_as_key(
334334
{
335335
"http.method": "GET",

instrumentation/opentelemetry-instrumentation-system-metrics/tests/test_system_metrics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_system_metrics_constructor(self):
3737
mock_get_meter.return_value = meter
3838
SystemMetrics(self.memory_metrics_exporter)
3939

40-
self.assertEqual(len(meter.observers), 18)
40+
self.assertEqual(len(meter.instruments), 18)
4141

4242
observer_names = [
4343
"system.cpu.time",
@@ -60,7 +60,7 @@ def test_system_metrics_constructor(self):
6060
"runtime.{}.gc_count".format(self.implementation),
6161
]
6262

63-
for observer in meter.observers:
63+
for observer in meter.instruments.values():
6464
self.assertIn(observer.name, observer_names)
6565
observer_names.remove(observer.name)
6666

tox.ini

+33-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,39 @@ commands_pre =
291291
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-sdk
292292
python -m pip install {toxinidir}/opentelemetry-python-core/tests/util
293293
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
294-
python scripts/eachdist.py install --editable --with-test-deps
294+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi[test]
295+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test]
296+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi[test]
297+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test]
298+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test]
299+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test]
300+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
301+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-falcon[test]
302+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test]
303+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test]
304+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy[test]
305+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test]
306+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sklearn[test]
307+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis[test]
308+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test]
309+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2[test]
310+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
311+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test]
312+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client[test]
313+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test]
314+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test]
315+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test]
316+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test]
317+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test]
318+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test]
319+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test]
320+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test]
321+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg[test]
322+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-tornado[test]
323+
python -m pip install -e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test]
324+
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-prometheus-remote-write[test]
325+
python -m pip install -e {toxinidir}/exporter/opentelemetry-exporter-datadog[test]
326+
python -m pip install -e {toxinidir}/sdk-extension/opentelemetry-sdk-extension-aws[test]
295327

296328
commands =
297329
python scripts/eachdist.py lint --check-only

0 commit comments

Comments
 (0)