-
Notifications
You must be signed in to change notification settings - Fork 155
Use opentracing 2.0 #206
Use opentracing 2.0 #206
Conversation
1a86904
to
21e1ae5
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.
thanks for getting started on this!
beb54a7
to
54c5e78
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.
Thank you for doing this PR, I just have some small comments.
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
028213f
to
6a15518
Compare
Co-Authored-By: mihau <mszymanski@vewd.com> Signed-off-by: Michał Szymański <mszymanski@vewd.com>
5b4a6f3
to
ef0dc0c
Compare
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
549df3e
to
e58ffd0
Compare
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
dcb03ab
to
dbd47f8
Compare
Codecov Report
@@ Coverage Diff @@
## master #206 +/- ##
==========================================
+ Coverage 94.63% 94.65% +0.02%
==========================================
Files 25 25
Lines 1902 1910 +8
Branches 256 257 +1
==========================================
+ Hits 1800 1808 +8
Misses 67 67
Partials 35 35
Continue to review full report at Codecov.
|
I've spotted an issue with what I believe is a problem of |
setup.py
Outdated
@@ -40,7 +40,7 @@ | |||
'threadloop>=1,<2', | |||
'thrift', | |||
'tornado>=4.3,<5', | |||
'opentracing>=1.2.2,<2', | |||
'opentracing>=2.0,<3.0', |
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.
pleasantly surprised that crossdock test works with 'opentracing_instrumentation>=2,<3'
Aside from the scope manager passed as class vs. instance, this lgtm otherwise (i.e. WIP can be removed). |
@yurishkuro and how do you feel about this commit do we leave it, or do we get it fixed in |
I think it's ok to leave it. Is there a ticket for opentracing-python? We should added it to the comments under |
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
bef78c5
to
be9a70c
Compare
Ok, cool. I've added the TODO note. Removing the WIP status. |
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
jaeger_client/tracer.py
Outdated
|
||
:return: Returns an already-started Span instance. | ||
""" | ||
parent = child_of | ||
|
||
if self.active_span is not None and not ignore_active_span: |
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.
I think it also needs and not parent
, because if child_of is passed explicitly, the active span should not be inherited (or am I mistaken?)
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.
I think you're right, it makes sense. Although one could use ignore_active_span
together with child_of
to pass it explicitly. Not exactly intuitive but still an option. The tests don't seem to enforce it in any way (maybe it would be appropriate to add one to do so?).
I added the condition, you might find the formatting controversial (multiline if
), let me know if you prefer a different way.
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Michał Szymański <mszymanski@vewd.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
Signed-off-by: Yuri Shkuro <ys@uber.com>
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.
Thanks for the PR!
This pull request bumps
opntracing
to 2.0 and implements changes needed for api compatibility (mainly regarding scope managers). I assumed compatibility with 2.x only, but maybe it would be possible to run it with 1.x as well, not sure if that is a good idea though.I used
ThreadLocalScopeManager
fromopentracing
as a default scope manager.The tests may fail because of an
opentracing
issue I fixed in opentracing/opentracing-python#97Resolves #199