Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
reyang committed Sep 27, 2019
1 parent 49ee3fe commit 2de1d0f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def ns_to_duration(nanoseconds):
days, hours, minutes, seconds, microseconds
)

def span_to_envelope(self, span):
def span_to_envelope(self, span): # noqa pylint: disable=too-many-branches
envelope = protocol.Envelope(
iKey=self.options.instrumentation_key,
tags=dict(util.azure_monitor_context),
Expand All @@ -95,10 +95,10 @@ def span_to_envelope(self, span):
envelope.tags["ai.operation.id"] = "{:032x}".format(
span.context.trace_id
)
if span.parent:
parent = span.parent
if isinstance(parent, Span):
parent = parent.context
parent = span.parent
if isinstance(parent, Span):
parent = parent.context
if parent:
envelope.tags[
"ai.operation.parentId"
] = "|{:032x}.{:016x}.".format(parent.trace_id, parent.span_id)
Expand Down

0 comments on commit 2de1d0f

Please sign in to comment.