Skip to content

Commit

Permalink
Address @Oberon00's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
c24t committed Oct 21, 2019
1 parent b7f1324 commit b653f3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions opentelemetry-api/src/opentelemetry/trace/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def should_sample(
trace_id: int,
span_id: int,
name: str,
links: Optional[Sequence["Link"]] = None,
links: Sequence["Link"] = (),
) -> "Decision":
pass

Expand All @@ -73,7 +73,7 @@ def should_sample(
trace_id: int,
span_id: int,
name: str,
links: Optional[Sequence["Link"]] = None,
links: Sequence["Link"] = (),
) -> "Decision":
return self._decision

Expand Down Expand Up @@ -110,12 +110,12 @@ def should_sample(
trace_id: int,
span_id: int,
name: str,
links: Optional[Sequence["Link"]] = None,
links: Sequence["Link"] = (),
) -> "Decision":
if parent_context is not None:
return Decision(parent_context.trace_options.sampled)

return Decision(trace_id & self.CHECK_BYTES < self.bound, {})
return Decision(trace_id & self.CHECK_BYTES < self.bound)


# Samplers that ignore the parent sampling decision and never/always sample.
Expand Down

0 comments on commit b653f3e

Please sign in to comment.