-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mauricio/add testbed for otshim #727
Mauricio/add testbed for otshim #727
Conversation
This commit ports the OpenTracing testbed[1] to check that the ot-shim is working as expected using different frameworks. Gevent doesn't support context vars yet[2], so those tests are not compatible with opentelemetry and were not ported. [1] https://github.com/opentracing/opentracing-python/tree/master/testbed [2] gevent/gevent#1407
In asyncio it is not needed to activate the span as the context is handled using contextvars in this case. This commit makes that a good solution and adds some comments to clarify why it is a good solution and why the thread is a bad one.
naming the tests module as a namespace package ensures that relative imports will resolve properly for other test packages, as it enables searching for a composite of multiple test modules. only the opentelemetry-api directory needs this code, as it is the first tests module found by pylint during eachdist.py lint Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit.
# | ||
# only the opentelemetry-api directory needs this code, as it is | ||
# the first tests module found by pylint during eachdist.py lint | ||
pkg_resources.declare_namespace(__name__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be removed once this bug is fixed / clarified: pylint-dev/pylint#3609
@carlosalberto can you approve this PR? this is a re-creation of PR #274, I just fixed it up to work with CI again. @c24t @codeboten if one of you feel comfortable doing a proxy approval for my previous approval, that would be great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for picking this up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to go ahead, but I think there's still good reason to put this in a separate repo like the trace context integration tests.
This commit ports the OpenTracing testbed[1] to check that the ot-shim is working as expected using different frameworks. Gevent doesn't support context vars yet[2], so those tests are not compatible with opentelemetry and were not ported. [1] https://github.com/opentracing/opentracing-python/tree/master/testbed [2] gevent/gevent#1407 Co-authored-by: Mauricio Vásquez <mauricio@kinvolk.io> Co-authored-by: alrex <aboten@lightstep.com>
This commit ports the OpenTracing testbed[1] to check that the ot-shim is working as expected using different frameworks. Gevent doesn't support context vars yet[2], so those tests are not compatible with opentelemetry and were not ported. [1] https://github.com/opentracing/opentracing-python/tree/master/testbed [2] gevent/gevent#1407 Co-authored-by: Mauricio Vásquez <mauricio@kinvolk.io> Co-authored-by: alrex <aboten@lightstep.com>
* feat: create an api package * chore: update circle for new api package * chore: bring back getTracer * chore: add wrongly removed dev dependency * chore: review comments * chore: review comments * chore: lint * chore: export all noop implementations * chore: update API README * chore: ignore known working links that are not yet published * chore: add jsdoc for getInstance calls * chore: add jsdoc for private constructors * chore: review comments * chore: fix readme npm url * chore: fix old readmes without registry * chore: update api calling convention
re-creation of #274 as I'm still figuring out how to push to a fork. Includes fixes to get tests to pass.