Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

fix B3Codec extract error for b3 header #301

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jaeger_client/codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def inject(self, span_context, carrier):
carrier[self.sampled_header] = '1'

def extract(self, carrier):
if not isinstance(carrier, dict):
if not hasattr(carrier, 'items'):
Copy link
Member

Choose a reason for hiding this comment

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

it doesn't seem like it'd work in py2. maybe six has an equivalent test function

raise InvalidCarrierException('carrier not a dictionary')
trace_id = span_id = parent_id = None
flags = 0x00
Expand Down