From 244e709bf029740826055f00d5e96ef99c690f3c Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Mon, 15 Jun 2020 13:59:57 -0700 Subject: [PATCH] starlette instrumentation (#777) adding an initial starlette instrumentation. tox does exact match on fields delimited by a dash. Thus, any instrumentation that includes "instrumentation" in the name would collide with testing of the "opentelemetry-instrumentation" package. Renaming opentelemetry-instrumentation to opentelemetry-instrumentation-base to fix that. Co-authored-by: Leighton Chen Co-authored-by: alrex --- tox.ini | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tox.ini b/tox.ini index cab2031aa..875f63fc3 100644 --- a/tox.ini +++ b/tox.ini @@ -17,8 +17,8 @@ envlist = pypy3-test-sdk ; opentelemetry-instrumentation - py3{5,6,7,8}-test-instrumentation - pypy3-test-instrumentation + py3{5,6,7,8}-test-instrumentation-base + pypy3-test-instrumentation-base ; opentelemetry-example-app py3{4,5,6,7,8}-test-example-app @@ -56,6 +56,11 @@ envlist = py3{4,5,6,7,8}-test-ext-requests pypy3-test-ext-requests + ; opentelemetry-instrumentation-starlette. + ; starlette only supports 3.6 and above. + py3{6,7,8}-test-instrumentation-starlette + pypy3-test-instrumentation-starlette + ; opentelemetry-ext-jinja2 py3{4,5,6,7,8}-test-ext-jinja2 pypy3-test-ext-jinja2 @@ -102,7 +107,7 @@ envlist = ; opentelemetry-ext-pyramid py3{4,5,6,7,8}-test-ext-pyramid pypy3-test-ext-pyramid - + ; opentelemetry-ext-asgi py3{5,6,7,8}-test-ext-asgi pypy3-test-ext-asgi @@ -172,8 +177,9 @@ setenv = changedir = test-api: opentelemetry-api/tests test-sdk: opentelemetry-sdk/tests + instrumentation-base: opentelemetry-instrumentation/tests + test-instrumentation-starlette: ext/opentelemetry-instrumentation-starlette/tests test-proto: opentelemetry-proto/tests - test-instrumentation: opentelemetry-instrumentation/tests test-ext-grpc: ext/opentelemetry-ext-grpc/tests test-ext-aiohttp-client: ext/opentelemetry-ext-aiohttp-client/tests test-ext-requests: ext/opentelemetry-ext-requests/tests @@ -223,10 +229,9 @@ commands_pre = grpc: pip install {toxinidir}/ext/opentelemetry-ext-grpc[test] - wsgi,flask,django,asgi,pyramid: pip install {toxinidir}/tests/util + wsgi,flask,django,asgi,pyramid,starlette: pip install {toxinidir}/tests/util wsgi,flask,django,pyramid: pip install {toxinidir}/ext/opentelemetry-ext-wsgi - - asgi: pip install {toxinidir}/ext/opentelemetry-ext-asgi + asgi,starlette: pip install {toxinidir}/ext/opentelemetry-ext-asgi boto: pip install {toxinidir}/ext/opentelemetry-ext-boto[test] @@ -264,6 +269,8 @@ commands_pre = requests: pip install {toxinidir}/ext/opentelemetry-ext-requests[test] + starlette: pip install {toxinidir}/ext/opentelemetry-instrumentation-starlette[test] + jinja2: pip install {toxinidir}/ext/opentelemetry-ext-jinja2[test] aiohttp-client: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/ext/opentelemetry-ext-aiohttp-client @@ -274,7 +281,7 @@ commands_pre = opentracing-shim: pip install {toxinidir}/ext/opentelemetry-ext-opentracing-shim datadog: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/ext/opentelemetry-ext-datadog - + zipkin: pip install {toxinidir}/ext/opentelemetry-ext-zipkin sqlalchemy: pip install {toxinidir}/ext/opentelemetry-ext-sqlalchemy @@ -322,7 +329,7 @@ deps = httpretty commands_pre = - python scripts/eachdist.py install --editable + python scripts/eachdist.py install --editable --with-test-deps commands = python scripts/eachdist.py lint --check-only