-
Notifications
You must be signed in to change notification settings - Fork 52
python3 fixes for tracer.py iteritems, Readme #16
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from django.conf import settings | ||
from django.utils.module_loading import import_string | ||
from future.utils import listitems | ||
import opentracing | ||
import threading | ||
|
||
|
@@ -64,7 +65,7 @@ def _apply_tracing(self, request, view_func, attributes): | |
''' | ||
# strip headers for trace info | ||
headers = {} | ||
for k,v in request.META.iteritems(): | ||
for k,v in listitems(request.META): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, stick with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well we can't stick with
|
||
k = k.lower().replace('_','-') | ||
if k.startswith('http-'): | ||
k = k[5:] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from django.conf import settings | ||
from django.http import HttpResponse | ||
from django.shortcuts import render | ||
from future.utils import listitems | ||
|
||
import opentracing | ||
import urllib2 | ||
|
@@ -51,6 +52,6 @@ def client_child_span(request): | |
def inject_as_headers(tracer, span, request): | ||
text_carrier = {} | ||
tracer._tracer.inject(span.context, opentracing.Format.TEXT_MAP, text_carrier) | ||
for k, v in text_carrier.iteritems(): | ||
for k, v in listitmes(text_carrier): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here. Also - this has a typo in any case |
||
request.add_header(k,v) | ||
|
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.
Shouldn't we preserve the existing behaviour of not converting to a list?
e.g.