Adding w3c tracecontext integration test (#228)

Verifying that our tracecontext is compliant with the w3c
tracecontext reference is valuable. Adding a tox command
to verify that the TraceContext propagator adheres to the
w3c spec.

The tracecontexthttptextformat is now completely compliant with the w3c
tracecontext test suite.
This commit is contained in:
Yusuke Tsutsumi
2019-10-29 11:01:59 -07:00
committed by GitHub
parent c7f20df264
commit 38c8c0fbc7
3 changed files with 21 additions and 0 deletions

View File

@ -10,6 +10,7 @@ exclude =
.svn
.tox
CVS
target
__pycache__
ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/
ext/opentelemetry-ext-jaeger/build/*

View File

@ -12,4 +12,5 @@ line_length=79
; )
; docs: https://github.com/timothycrosley/isort#multi-line-output-modes
multi_line_output=3
skip=target
skip_glob=ext/opentelemetry-ext-jaeger/src/opentelemetry/ext/jaeger/gen/*

19
tox.ini
View File

@ -5,6 +5,7 @@ envlist =
py3{4,5,6,7,8}-test-{api,sdk,example-app,ext-wsgi,ext-http-requests,ext-jaeger,opentracing-shim}
pypy3-test-{api,sdk,example-app,ext-wsgi,ext-http-requests,ext-jaeger,opentracing-shim}
lint
py37-tracecontext
py37-{mypy,mypyinstalled}
docs
@ -111,3 +112,21 @@ changedir = docs
commands =
sphinx-build -W --keep-going -b html -T . _build/html
[testenv:py37-tracecontext]
basepython: python3.7
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
pip install -e {toxinidir}/opentelemetry-sdk
pip install -e {toxinidir}/ext/opentelemetry-ext-http-requests
pip install -e {toxinidir}/ext/opentelemetry-ext-wsgi
commands =
{toxinidir}/scripts/tracecontext-integration-test.sh