-
Notifications
You must be signed in to change notification settings - Fork 710
Add testbed for otel-ot-shim #274
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
Add testbed for otel-ot-shim #274
Conversation
Codecov Report
@@ Coverage Diff @@
## master #274 +/- ##
==========================================
- Coverage 89.50% 84.91% -4.59%
==========================================
Files 43 38 -5
Lines 2229 1889 -340
Branches 248 217 -31
==========================================
- Hits 1995 1604 -391
- Misses 159 219 +60
+ Partials 75 66 -9
Continue to review full report at Codecov.
|
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_late_span_finish/test_tornado.py
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_late_span_finish/test_asyncio.py
Outdated
Show resolved
Hide resolved
Hey, it looks overall good. I'm wondering about the updates for the build scripts, but I guess @c24t can ponder that ;) |
2d30cca
to
c5ea413
Compare
Did a second review and I feel it looks fine, but I'm wondering about the build/script part (such as https://github.com/open-telemetry/opentelemetry-python/pull/274/files#r345754382) - but other than that I'm fine with all of this. @c24t if you feel the script changes are fine, lets go with it. Else, lets postpone merging it and have someone else working on this. |
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.
Overall this looks good, and I feel like these patterns would be valuable to illustrate even for opentelemetry API examples.
There's a few parts that seem to not match the description, or I could be misunderstanding. I have comments around those parts.
...pentelemetry-ext-opentracing-shim/tests/testbed/test_active_span_replacement/test_threads.py
Show resolved
Hide resolved
...pentelemetry-ext-opentracing-shim/tests/testbed/test_active_span_replacement/test_tornado.py
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_client_server/test_asyncio.py
Show resolved
Hide resolved
...opentelemetry-ext-opentracing-shim/tests/testbed/test_common_request_handler/test_asyncio.py
Show resolved
Hide resolved
...opentelemetry-ext-opentracing-shim/tests/testbed/test_common_request_handler/test_asyncio.py
Show resolved
Hide resolved
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_listener_per_request/README.rst
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_multiple_callbacks/README.rst
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_nested_callbacks/README.rst
Outdated
Show resolved
Hide resolved
ext/opentelemetry-ext-opentracing-shim/tests/testbed/test_nested_callbacks/README.rst
Outdated
Show resolved
Hide resolved
Please note supporting of contextvars in OT with relevant changes in testbed. |
I think we don't need to include tornado testbed here because of:
All this means that Tornado testbed is redundant and could be covered by contextvars testbed. |
Hey @condorcet Thanks for chiming it ;) Yes, I think we should 'retire' the Tornado section, as it doesn't need its own thing and it's supposed to behave the same as asyncio, regarding to (I remember comments long, long time ago at being some differences between the Tornado and asyncio using |
Hey hey @toumorokoshi So probably we ought to add a longer description + rationale about this (I can tell you this were incredible useful back at the time of implementing this API, as we needed to support a few frameworks: tornado, gevent, asyncio, etc - good thing is that now we have |
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
91d547f
to
54686a6
Compare
@condorcet @carlosalberto I'm going to remove the Tornado test cases then. |
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.
4fcad3b
to
82a94ec
Compare
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.
Approving as I originally misunderstood the intent, and this is good code to validate opentracing that we should be adding into our suites. Thanks!
merged as part of #727. thanks! |
closes open-telemetry#274 Signed-off-by: Olivier Albertini <[email protected]>
This PR ports the OpenTracing testbed https://github.com/opentracing/opentracing-python/tree/master/testb to check that the ot-shim is working as expected using different frameworks.
Gevent doesn't support context vars yet gevent/gevent#1407, so those tests are not compatible with opentelemetry and were not ported.