Skip to content

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Jan 19, 2026

Description

This adds a composable rule based sampler to the experimental samplers.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e py310-test-opentelemetry-sdk

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@xrmx xrmx requested a review from a team as a code owner January 19, 2026 09:51
xrmx and others added 3 commits January 20, 2026 09:49
…mental/_rule_based.py

Co-authored-by: Anuraag (Rag) Agrawal <anuraaga@gmail.com>
…t_description

While at it also provide AttributePredicate
def __str__(self) -> str: ...


class AttributePredicate:
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to export this in __init__.py? Or otherwise probably better to move to the test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure I want to export this from __init__.py since this is not in the spec but I've seen java implements this (and isRoot) and can be handy for users I guess.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right - just basically, if not exporting it, it could just be treated as a test helper instead of here I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants