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

Find django spans in the stack #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wiedi
Copy link

@wiedi wiedi commented Feb 7, 2020

The django middleware doesn't put the span on the stack directly but instead stores it on the request object. This helps find it anyway.

@codecov
Copy link

codecov bot commented Feb 7, 2020

Codecov Report

Merging #39 (bee1d6a) into master (cc2c2b7) will decrease coverage by 0.78%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   98.61%   97.83%   -0.79%     
==========================================
  Files           9        9              
  Lines         362      370       +8     
==========================================
+ Hits          357      362       +5     
- Misses          5        8       +3     
Impacted Files Coverage Δ
opentracing_utils/span.py 96.05% <62.50%> (-3.95%) ⬇️

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 cc2c2b7...bee1d6a. Read the comment docs.

@pitr
Copy link

pitr commented Feb 11, 2020

Could this code be added to libs/_django.py instead?

@wiedi
Copy link
Author

wiedi commented Feb 11, 2020

I am not sure. Do you have a concrete idea what that should look like?

Just placing the span in the stack context instead of attaching it to the request object would probably not be enough since process_view itself won't always be in the stacktrace due to how the django middleware works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants