Skip to content
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 OpenTracing shim example #282

Merged
merged 21 commits into from
Feb 4, 2020

Conversation

c24t
Copy link
Member

@c24t c24t commented Nov 11, 2019

I was working on a demo for OpenTracing compatibility and thought it'd be useful to include as an example here.

I wrote this in the style of #277, and copied some boilerplate text from that PR. We should consider making examples work with any backend, but I've only included Jaeger for now.

@johananl, @codeboten, @carlosalberto, let me know what you think!

@c24t c24t added the doc Documentation-related label Nov 11, 2019
@codecov-io
Copy link

codecov-io commented Nov 11, 2019

Codecov Report

Merging #282 into master will decrease coverage by 0.02%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #282      +/-   ##
==========================================
- Coverage   85.32%   85.29%   -0.03%     
==========================================
  Files          38       38              
  Lines        1928     1931       +3     
  Branches      227      227              
==========================================
+ Hits         1645     1647       +2     
- Misses        218      219       +1     
  Partials       65       65
Impacted Files Coverage Δ
...xt-jaeger/src/opentelemetry/ext/jaeger/__init__.py 86.54% <ø> (ø) ⬆️
...elemetry-api/src/opentelemetry/metrics/__init__.py 88.13% <100%> (ø) ⬆️
...app/src/opentelemetry_example_app/flask_example.py 100% <100%> (ø) ⬆️
...emetry-sdk/src/opentelemetry/sdk/trace/__init__.py 90.74% <80%> (+0.03%) ⬆️
...sdk/src/opentelemetry/sdk/trace/export/__init__.py 86.11% <0%> (-0.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0239c08...73bada3. Read the comment docs.

Copy link
Member

@mauriciovasquezbernal mauriciovasquezbernal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't try it myself by generally it looks fine.

I added comments about some details I spotted.

examples/opentracing/README.md Outdated Show resolved Hide resolved
examples/opentracing/requirements.txt Show resolved Hide resolved
examples/opentracing/README.md Show resolved Hide resolved
examples/opentracing/README.md Show resolved Hide resolved
examples/opentracing/main.py Outdated Show resolved Hide resolved
@codeboten
Copy link
Contributor

Ran through the example. Other than the missing opentelemetry-ext-jaeger requirement, it looks good

@a-feld a-feld removed their request for review December 10, 2019 00:55
@c24t c24t requested a review from a team December 20, 2019 00:52
@ocelotl ocelotl added ext needs reviewers PRs with this label are ready for review and needs people to review to move forward. labels Dec 20, 2019
Copy link
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review, I tried the example itself and it works fine 👍

@codeboten
Copy link
Contributor

Thanks for fixing this @ocelotl! Approved with a non-blocking comment.

@mauriciovasquezbernal
Copy link
Member

I see that now the PR has also some changes to the code of the shim, are those changes necessary?, if yes my suggestion would be to open a PR containing only those changes, IMO a PR that implements an example but also modifies the source code creates confusion.

@c24t
Copy link
Member Author

c24t commented Jan 23, 2020

I see that now the PR has also some changes to the code of the shim, are those changes necessary?

It looks like 5a224ad was necessary to avoid some false-positive no-member pylint errors now that we're running it via eachdist.py.

@mauriciovasquezbernal
Copy link
Member

Is this commit needed 79912de?, I see that there is a revert and and then a revert of the revert.

If that commit is still needed is think it should be part of a separated PR. This PR is adding an example and should do only that, like in your first commit: c3e965d.

@mauriciovasquezbernal mauriciovasquezbernal added the shim OpenTracing or OpenCensus compatibility label Jan 28, 2020
@c24t
Copy link
Member Author

c24t commented Jan 29, 2020

@mauriciovasquezbernal this should be ready to go now that #376 is in.

Copy link
Member

@Oberon00 Oberon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like that we need to work around pylint here, but otherwise LGTM.

examples/opentracing/README.md Outdated Show resolved Hide resolved
Copy link
Member

@mauriciovasquezbernal mauriciovasquezbernal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see changes to the opentracing-shim code. Is it missing the revert (of the revert of the revert 🤣 ) of 9d3ef06 after #376?

Besides that LGTM!

examples/opentracing/rediscache.py Outdated Show resolved Hide resolved
c24t and others added 4 commits February 4, 2020 11:44
Co-Authored-By: Christian Neumüller <christian+github@neumueller.me>
Co-Authored-By: Mauricio Vásquez <mauricio@kinvolk.io>
@c24t
Copy link
Member Author

c24t commented Feb 4, 2020

@mauriciovasquezbernal 0239c08 is the last revert (of a revert of a revert...).

Copy link
Member

@mauriciovasquezbernal mauriciovasquezbernal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@c24t c24t merged commit ae484cb into open-telemetry:master Feb 4, 2020
@c24t c24t deleted the opentracing-shim-example branch February 4, 2020 20:37
toumorokoshi pushed a commit to toumorokoshi/opentelemetry-python that referenced this pull request Feb 17, 2020
Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Co-authored-by: Mauricio Vásquez <mauricio@kinvolk.io>
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation-related needs reviewers PRs with this label are ready for review and needs people to review to move forward. shim OpenTracing or OpenCensus compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants