Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Find django spans in the stack#39

Open
wiedi wants to merge 1 commit intozalando-zmon:masterfrom
wiedi:find-django-span
Open

Find django spans in the stack#39
wiedi wants to merge 1 commit intozalando-zmon:masterfrom
wiedi:find-django-span

Conversation

@wiedi
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown

pitr commented Feb 11, 2020

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

@wiedi
Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants