434 lines
18 KiB
INI
434 lines
18 KiB
INI
[tox]
|
|
skipsdist = True
|
|
skip_missing_interpreters = True
|
|
envlist =
|
|
; Environments are organized by individual package, allowing
|
|
; for specifying supported Python versions per package.
|
|
; opentelemetry-api
|
|
py3{4,5,6,7,8}-test-core-api
|
|
pypy3-test-core-api
|
|
|
|
; opentelemetry-proto
|
|
py3{4,5,6,7,8}-test-core-proto
|
|
pypy3-test-core-proto
|
|
|
|
; opentelemetry-sdk
|
|
py3{4,5,6,7,8}-test-core-sdk
|
|
pypy3-test-core-sdk
|
|
|
|
; opentelemetry-instrumentation
|
|
py3{5,6,7,8}-test-core-instrumentation
|
|
pypy3-test-core-instrumentation
|
|
|
|
; docs/getting-started
|
|
py3{4,5,6,7,8}-test-core-getting-started
|
|
pypy3-test-core-getting-started
|
|
|
|
; opentelemetry-example-app
|
|
py3{4,5,6,7,8}-test-instrumentation-example-app
|
|
pypy3-test-instrumentation-example-app
|
|
|
|
; opentelemetry-instrumentation-aiohttp-client
|
|
py3{5,6,7,8}-test-instrumentation-aiohttp-client
|
|
pypy3-test-instrumentation-aiohttp-client
|
|
|
|
; opentelemetry-instrumentation-aiopg
|
|
py3{5,6,7,8}-test-instrumentation-aiopg
|
|
; instrumentation-aiopg intentionally excluded from pypy3
|
|
|
|
; opentelemetry-instrumentation-botocore
|
|
py3{6,7,8}-test-instrumentation-botocore
|
|
pypy3-test-instrumentation-botocore
|
|
|
|
; opentelemetry-instrumentation-django
|
|
py3{4,5,6,7,8}-test-instrumentation-django
|
|
pypy3-test-instrumentation-django
|
|
|
|
; opentelemetry-instrumentation-dbapi
|
|
py3{4,5,6,7,8}-test-instrumentation-dbapi
|
|
pypy3-test-instrumentation-dbapi
|
|
|
|
; opentelemetry-instrumentation-boto
|
|
py3{5,6,7,8}-test-instrumentation-boto
|
|
pypy3-test-instrumentation-boto
|
|
|
|
; opentelemetry-instrumentation-elasticsearch
|
|
py3{4,5,6,7,8}-test-instrumentation-elasticsearch{2,5,6,7}
|
|
pypy3-test-instrumentation-elasticsearch{2,5,6,7}
|
|
|
|
; opentelemetry-instrumentation-fastapi
|
|
; fastapi only supports 3.6 and above.
|
|
py3{6,7,8}-test-instrumentation-fastapi
|
|
pypy3-test-instrumentation-fastapi
|
|
|
|
; opentelemetry-instrumentation-flask
|
|
py3{4,5,6,7,8}-test-instrumentation-flask
|
|
pypy3-test-instrumentation-flask
|
|
|
|
; opentelemetry-instrumentation-requests
|
|
py3{4,5,6,7,8}-test-instrumentation-requests
|
|
pypy3-test-instrumentation-requests
|
|
|
|
; opentelemetry-instrumentation-starlette.
|
|
; starlette only supports 3.6 and above.
|
|
py3{6,7,8}-test-instrumentation-starlette
|
|
pypy3-test-instrumentation-starlette
|
|
|
|
; opentelemetry-instrumentation-jinja2
|
|
py3{4,5,6,7,8}-test-instrumentation-jinja2
|
|
pypy3-test-instrumentation-jinja2
|
|
|
|
; opentelemetry-exporter-jaeger
|
|
py3{4,5,6,7,8}-test-exporter-jaeger
|
|
pypy3-test-exporter-jaeger
|
|
|
|
; opentelemetry-exporter-datadog
|
|
py3{5,6,7,8}-test-exporter-datadog
|
|
|
|
; opentelemetry-instrumentation-mysql
|
|
py3{4,5,6,7,8}-test-instrumentation-mysql
|
|
pypy3-test-instrumentation-mysql
|
|
|
|
; opentelemetry-exporter-opencensus
|
|
py3{4,5,6,7,8}-test-exporter-opencensus
|
|
; exporter-opencensus intentionally excluded from pypy3
|
|
|
|
; opentelemetry-exporter-otlp
|
|
py3{5,6,7,8}-test-exporter-otlp
|
|
; exporter-otlp intentionally excluded from pypy3
|
|
|
|
; opentelemetry-exporter-prometheus
|
|
py3{4,5,6,7,8}-test-exporter-prometheus
|
|
pypy3-test-exporter-prometheus
|
|
|
|
; opentelemetry-instrumentation-psycopg2
|
|
py3{4,5,6,7,8}-test-instrumentation-psycopg2
|
|
; ext-psycopg2 intentionally excluded from pypy3
|
|
|
|
; opentelemetry-instrumentation-pymemcache
|
|
py3{4,5,6,7,8}-test-instrumentation-pymemcache
|
|
pypy3-test-instrumentation-pymemcache
|
|
|
|
; opentelemetry-instrumentation-pymongo
|
|
py3{4,5,6,7,8}-test-instrumentation-pymongo
|
|
pypy3-test-instrumentation-pymongo
|
|
|
|
; opentelemetry-instrumentation-pymysql
|
|
py3{4,5,6,7,8}-test-instrumentation-pymysql
|
|
pypy3-test-instrumentation-pymysql
|
|
|
|
; opentelemetry-instrumentation-pyramid
|
|
py3{4,5,6,7,8}-test-instrumentation-pyramid
|
|
pypy3-test-instrumentation-pyramid
|
|
|
|
; opentelemetry-instrumentation-asgi
|
|
py3{5,6,7,8}-test-instrumentation-asgi
|
|
pypy3-test-instrumentation-asgi
|
|
|
|
; opentelemetry-instrumentation-asyncpg
|
|
py3{5,6,7,8}-test-instrumentation-asyncpg
|
|
; ext-asyncpg intentionally excluded from pypy3
|
|
|
|
; opentelemetry-instrumentation-sqlite3
|
|
py3{4,5,6,7,8}-test-instrumentation-sqlite3
|
|
pypy3-test-instrumentation-sqlite3
|
|
|
|
; opentelemetry-instrumentation-wsgi
|
|
py3{4,5,6,7,8}-test-instrumentation-wsgi
|
|
pypy3-test-instrumentation-wsgi
|
|
|
|
; opentelemetry-exporter-zipkin
|
|
py3{4,5,6,7,8}-test-exporter-zipkin
|
|
pypy3-test-exporter-zipkin
|
|
|
|
; opentelemetry-opentracing-shim
|
|
py3{4,5,6,7,8}-test-core-opentracing-shim
|
|
pypy3-test-core-opentracing-shim
|
|
|
|
; opentelemetry-instrumentation-grpc
|
|
py3{5,6,7,8}-test-instrumentation-grpc
|
|
|
|
; opentelemetry-instrumentation-sqlalchemy
|
|
py3{4,5,6,7,8}-test-instrumentation-sqlalchemy
|
|
pypy3-test-instrumentation-sqlalchemy
|
|
|
|
; opentelemetry-instrumentation-redis
|
|
py3{4,5,6,7,8}-test-instrumentation-redis
|
|
pypy3-test-instrumentation-redis
|
|
|
|
; opentelemetry-instrumentation-celery
|
|
py3{5,6,7,8}-test-instrumentation-celery
|
|
pypy3-test-instrumentation-celery
|
|
|
|
; opentelemetry-instrumentation-system-metrics
|
|
py3{4,5,6,7,8}-test-instrumentation-system-metrics
|
|
; instrumentation-system-metrics intentionally excluded from pypy3
|
|
; known limitation: gc.get_count won't work under pypy
|
|
|
|
lint
|
|
py38-tracecontext
|
|
py38-{mypy,mypyinstalled}
|
|
docs
|
|
docker-tests
|
|
|
|
[testenv]
|
|
deps =
|
|
-c dev-requirements.txt
|
|
test: pytest
|
|
coverage: pytest
|
|
coverage: pytest-cov
|
|
mypy,mypyinstalled: mypy
|
|
elasticsearch2: elasticsearch-dsl>=2.0,<3.0
|
|
elasticsearch2: elasticsearch>=2.0,<3.0
|
|
elasticsearch5: elasticsearch-dsl>=5.0,<6.0
|
|
elasticsearch5: elasticsearch>=5.0,<6.0
|
|
elasticsearch6: elasticsearch-dsl>=6.0,<7.0
|
|
elasticsearch6: elasticsearch>=6.0,<7.0
|
|
elasticsearch7: elasticsearch-dsl>=7.0,<8.0
|
|
elasticsearch7: elasticsearch>=7.0,<8.0
|
|
|
|
setenv = mypy: MYPYPATH={toxinidir}/opentelemetry-api/src/
|
|
|
|
changedir =
|
|
test-core-api: opentelemetry-api/tests
|
|
test-core-sdk: opentelemetry-sdk/tests
|
|
test-core-proto: opentelemetry-proto/tests
|
|
test-core-instrumentation: opentelemetry-instrumentation/tests
|
|
test-core-getting-started: docs/getting_started/tests
|
|
test-core-opentracing-shim: instrumentation/opentelemetry-instrumentation-opentracing-shim/tests
|
|
|
|
test-instrumentation-aiohttp-client: instrumentation/opentelemetry-instrumentation-aiohttp-client/tests
|
|
test-instrumentation-aiopg: instrumentation/opentelemetry-instrumentation-aiopg/tests
|
|
test-instrumentation-asgi: instrumentation/opentelemetry-instrumentation-asgi/tests
|
|
test-instrumentation-asyncpg: instrumentation/opentelemetry-instrumentation-asyncpg/tests
|
|
test-instrumentation-boto: instrumentation/opentelemetry-instrumentation-boto/tests
|
|
test-instrumentation-botocore: instrumentation/opentelemetry-instrumentation-botocore/tests
|
|
test-instrumentation-celery: instrumentation/opentelemetry-instrumentation-celery/tests
|
|
test-instrumentation-dbapi: instrumentation/opentelemetry-instrumentation-dbapi/tests
|
|
test-instrumentation-django: instrumentation/opentelemetry-instrumentation-django/tests
|
|
test-instrumentation-example-app: docs/examples/opentelemetry-example-app/tests
|
|
test-instrumentation-elasticsearch{2,5,6,7}: instrumentation/opentelemetry-instrumentation-elasticsearch/tests
|
|
test-instrumentation-fastapi: instrumentation/opentelemetry-instrumentation-fastapi/tests
|
|
test-instrumentation-flask: instrumentation/opentelemetry-instrumentation-flask/tests
|
|
test-instrumentation-grpc: instrumentation/opentelemetry-instrumentation-grpc/tests
|
|
test-instrumentation-jinja2: instrumentation/opentelemetry-instrumentation-jinja2/tests
|
|
test-instrumentation-mysql: instrumentation/opentelemetry-instrumentation-mysql/tests
|
|
test-instrumentation-psycopg2: instrumentation/opentelemetry-instrumentation-psycopg2/tests
|
|
test-instrumentation-pymemcache: instrumentation/opentelemetry-instrumentation-pymemcache/tests
|
|
test-instrumentation-pymongo: instrumentation/opentelemetry-instrumentation-pymongo/tests
|
|
test-instrumentation-pymysql: instrumentation/opentelemetry-instrumentation-pymysql/tests
|
|
test-instrumentation-pyramid: instrumentation/opentelemetry-instrumentation-pyramid/tests
|
|
test-instrumentation-redis: instrumentation/opentelemetry-instrumentation-redis/tests
|
|
test-instrumentation-requests: instrumentation/opentelemetry-instrumentation-requests/tests
|
|
test-instrumentation-sqlalchemy: instrumentation/opentelemetry-instrumentation-sqlalchemy/tests
|
|
test-instrumentation-sqlite3: instrumentation/opentelemetry-instrumentation-sqlite3/tests
|
|
test-instrumentation-starlette: instrumentation/opentelemetry-instrumentation-starlette/tests
|
|
test-instrumentation-system-metrics: instrumentation/opentelemetry-instrumentation-system-metrics/tests
|
|
test-instrumentation-wsgi: instrumentation/opentelemetry-instrumentation-wsgi/tests
|
|
|
|
test-exporter-jaeger: exporter/opentelemetry-exporter-jaeger/tests
|
|
test-exporter-datadog: exporter/opentelemetry-exporter-datadog/tests
|
|
test-exporter-opencensus: exporter/opentelemetry-exporter-opencensus/tests
|
|
test-exporter-otlp: exporter/opentelemetry-exporter-otlp/tests
|
|
test-exporter-prometheus: exporter/opentelemetry-exporter-prometheus/tests
|
|
test-exporter-zipkin: exporter/opentelemetry-exporter-zipkin/tests
|
|
|
|
commands_pre =
|
|
; Install without -e to test the actual installation
|
|
py3{4,5,6,7,8}: python -m pip install -U pip setuptools wheel
|
|
; Install common packages for all the tests. These are not needed in all the
|
|
; cases but it saves a lot of boilerplate in this file.
|
|
test: pip install {toxinidir}/opentelemetry-api {toxinidir}/opentelemetry-sdk {toxinidir}/tests/util
|
|
|
|
test-core-proto: pip install {toxinidir}/opentelemetry-proto
|
|
instrumentation: pip install {toxinidir}/opentelemetry-instrumentation
|
|
|
|
example-app: pip install {toxinidir}/opentelemetry-instrumentation {toxinidir}/instrumentation/opentelemetry-instrumentation-requests {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi {toxinidir}/instrumentation/opentelemetry-instrumentation-flask {toxinidir}/docs/examples/opentelemetry-example-app
|
|
|
|
getting-started: pip install -e {toxinidir}/opentelemetry-instrumentation -e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests -e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi -e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
|
|
|
|
celery: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-celery[test]
|
|
|
|
grpc: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc[test]
|
|
|
|
wsgi,flask,django,pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi
|
|
asgi,starlette,fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi
|
|
|
|
asyncpg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg
|
|
|
|
boto: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test]
|
|
boto: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-boto[test]
|
|
|
|
flask: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-flask[test]
|
|
|
|
botocore: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-botocore[test]
|
|
|
|
dbapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi[test]
|
|
|
|
django: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-django[test]
|
|
|
|
fastapi: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi[test]
|
|
|
|
mysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql[test]
|
|
|
|
opencensus: pip install {toxinidir}/exporter/opentelemetry-exporter-opencensus
|
|
|
|
otlp: pip install {toxinidir}/opentelemetry-proto
|
|
otlp: pip install {toxinidir}/exporter/opentelemetry-exporter-otlp
|
|
|
|
prometheus: pip install {toxinidir}/exporter/opentelemetry-exporter-prometheus
|
|
|
|
pymemcache: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymemcache[test]
|
|
|
|
pymongo: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo[test]
|
|
|
|
psycopg2: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2[test]
|
|
|
|
pymysql: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql[test]
|
|
|
|
pyramid: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-pyramid[test]
|
|
|
|
sqlite3: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlite3[test]
|
|
|
|
redis: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-redis[test]
|
|
|
|
requests: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-requests[test]
|
|
|
|
starlette: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-starlette[test]
|
|
|
|
jinja2: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-jinja2[test]
|
|
|
|
aiohttp-client: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/instrumentation/opentelemetry-instrumentation-aiohttp-client
|
|
|
|
aiopg: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg[test]
|
|
|
|
jaeger: pip install {toxinidir}/exporter/opentelemetry-exporter-jaeger
|
|
|
|
opentracing-shim: pip install {toxinidir}/opentelemetry-sdk
|
|
opentracing-shim: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-opentracing-shim
|
|
|
|
datadog: pip install {toxinidir}/opentelemetry-sdk {toxinidir}/exporter/opentelemetry-exporter-datadog
|
|
|
|
zipkin: pip install {toxinidir}/exporter/opentelemetry-exporter-zipkin
|
|
|
|
sqlalchemy: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy
|
|
|
|
system-metrics: pip install {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics[test]
|
|
|
|
elasticsearch{2,5,6,7}: pip install {toxinidir}/opentelemetry-instrumentation {toxinidir}/instrumentation/opentelemetry-instrumentation-elasticsearch[test]
|
|
|
|
; In order to get a healthy coverage report,
|
|
; we have to install packages in editable mode.
|
|
coverage: python {toxinidir}/scripts/eachdist.py install --editable
|
|
|
|
; Using file:// here because otherwise tox invokes just "pip install
|
|
; opentelemetry-api", leading to an error
|
|
mypyinstalled: pip install file://{toxinidir}/opentelemetry-api/
|
|
|
|
commands =
|
|
test: pytest {posargs}
|
|
coverage: {toxinidir}/scripts/coverage.sh
|
|
|
|
mypy: mypy --namespace-packages opentelemetry-api/src/opentelemetry/
|
|
; For test code, we don't want to enforce the full mypy strictness
|
|
mypy: mypy --namespace-packages --config-file=mypy-relaxed.ini opentelemetry-api/tests/
|
|
|
|
; Test that mypy can pick up typeinfo from an installed package (otherwise,
|
|
; implicit Any due to unfollowed import would result).
|
|
mypyinstalled: mypy --namespace-packages opentelemetry-api/tests/mypysmoke.py --strict
|
|
|
|
[testenv:py34-test-core-opentracing-shim]
|
|
commands =
|
|
pytest --ignore-glob='*[asyncio].py'
|
|
|
|
[testenv:lint]
|
|
basepython: python3.8
|
|
recreate = True
|
|
deps =
|
|
-c dev-requirements.txt
|
|
pylint
|
|
flake8
|
|
isort
|
|
black
|
|
psutil
|
|
readme_renderer
|
|
httpretty
|
|
|
|
commands_pre =
|
|
python scripts/eachdist.py install --editable --with-test-deps
|
|
|
|
commands =
|
|
python scripts/eachdist.py lint --check-only
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c {toxinidir}/dev-requirements.txt
|
|
-r {toxinidir}/docs-requirements.txt
|
|
|
|
changedir = docs
|
|
|
|
commands =
|
|
sphinx-build -E -a -W -b html -T . _build/html
|
|
|
|
[testenv:py38-tracecontext]
|
|
basepython: python3.8
|
|
deps =
|
|
# needed for tracecontext
|
|
aiohttp~=3.6
|
|
# needed for example trace integration
|
|
flask~=1.1
|
|
requests~=2.7
|
|
|
|
commands_pre =
|
|
pip install -e {toxinidir}/opentelemetry-api \
|
|
-e {toxinidir}/opentelemetry-instrumentation \
|
|
-e {toxinidir}/opentelemetry-sdk \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-requests \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-wsgi \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-flask
|
|
|
|
commands =
|
|
{toxinidir}/scripts/tracecontext-integration-test.sh
|
|
|
|
[testenv:docker-tests]
|
|
deps =
|
|
pytest
|
|
asyncpg==0.20.1
|
|
docker-compose >= 1.25.2
|
|
mysql-connector-python ~= 8.0
|
|
pymongo ~= 3.1
|
|
pymysql ~= 0.9.3
|
|
psycopg2-binary ~= 2.8.4
|
|
aiopg >= 0.13.0
|
|
sqlalchemy ~= 1.3.16
|
|
redis ~= 3.3.11
|
|
celery ~= 4.0, != 4.4.4
|
|
|
|
changedir =
|
|
tests/opentelemetry-docker-tests/tests
|
|
|
|
commands_pre =
|
|
pip install -e {toxinidir}/opentelemetry-api \
|
|
-e {toxinidir}/opentelemetry-sdk \
|
|
-e {toxinidir}/opentelemetry-instrumentation \
|
|
-e {toxinidir}/tests/util \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-asyncpg \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-celery \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg2 \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-pymysql \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-sqlalchemy \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-aiopg \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-redis \
|
|
-e {toxinidir}/instrumentation/opentelemetry-instrumentation-system-metrics \
|
|
-e {toxinidir}/exporter/opentelemetry-exporter-opencensus
|
|
docker-compose up -d
|
|
python check_availability.py
|
|
commands =
|
|
pytest {posargs}
|
|
|
|
commands_post =
|
|
docker-compose down
|