opentelemetry-sdk: add experimental composable rule based sampler#4882
opentelemetry-sdk: add experimental composable rule based sampler#4882xrmx wants to merge 8 commits intoopen-telemetry:mainfrom
Conversation
opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py
Outdated
Show resolved
Hide resolved
…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: |
There was a problem hiding this comment.
Did you mean to export this in __init__.py? Or otherwise probably better to move to the test
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Right - just basically, if not exporting it, it could just be treated as a test helper instead of here I think
There was a problem hiding this comment.
Even if this is not exported in __init__ does not mean it's not importable
There was a problem hiding this comment.
Sure if the intent was to have an experimental API that has no compatibility guarantees that's good. In that case, how about adding that to the docstring?
There was a problem hiding this comment.
That's kinda implicit when the module is prefixed with the underscore, to me that means that is not a stable API.
Description
This adds a composable rule based sampler to the experimental samplers.
Type of change
Please delete options that are not relevant.
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
Does This PR Require a Contrib Repo Change?
Checklist: