Skip to content

Commit

Permalink
Remove unnecessary refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun-Kim committed Sep 19, 2024
1 parent 84c74f3 commit b5e0dd1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ddtrace/llmobs/_integrations/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,18 @@ def llmobs_enabled(self) -> bool:
return LLMObs.enabled

def is_pc_sampled_span(self, span: Span) -> bool:
if span.context.sampling_priority and span.context.sampling_priority <= 0:
return False
if span.context.sampling_priority is not None:
if span.context.sampling_priority <= 0:
return False
return self._span_pc_sampler.sample(span)

def is_pc_sampled_log(self, span: Span) -> bool:
if span.context.sampling_priority is not None:
if span.context.sampling_priority <= 0:
return False

if not self.logs_enabled:
return False
if span.context.sampling_priority and span.context.sampling_priority <= 0:
return False
return self._log_pc_sampler.sample(span)

def is_pc_sampled_llmobs(self, span: Span) -> bool:
Expand Down

0 comments on commit b5e0dd1

Please sign in to comment.