Skip to content

Commit

Permalink
fix: check non-root spans for sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
sagivoululumigo committed Dec 4, 2023
1 parent 85c011a commit 1ddb57a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lumigo_opentelemetry/libs/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ def get_description(self) -> str:
return "SkipSampler"


LUMIGO_SAMPLER = ParentBased(AttributeSampler())
_attribute_sampler = AttributeSampler()
LUMIGO_SAMPLER = ParentBased(
root=_attribute_sampler,
# If the parent was sampled we still want to check the current span for sampling
remote_parent_sampled=_attribute_sampler,
local_parent_sampled=_attribute_sampler,
)


def _extract_url(attributes: Attributes) -> Optional[str]:
Expand Down

0 comments on commit 1ddb57a

Please sign in to comment.