Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RulesBasedSampler as a Sub-Sampler of the RulesBasedSampler #1343

Open
tdarwin opened this issue Sep 19, 2024 · 0 comments
Open

RulesBasedSampler as a Sub-Sampler of the RulesBasedSampler #1343

tdarwin opened this issue Sep 19, 2024 · 0 comments
Labels
type: enhancement New feature or request

Comments

@tdarwin
Copy link
Contributor

tdarwin commented Sep 19, 2024

Describe the solution you'd like
It would be really awesome to be able to use the RulesBasedSampler as a sub-sampler of a Rule in the parent RulesBasedSampler. Something like this:

Samplers:
    __default__:
        RulesBasedSampler:
               - Name: Dealing with Errors
                 Conditions:
                    - Field: error
                      Operator: exists
                 Sampler:
                    RulesBasedSampler:
                        - Name: Ignore Errors From X Service
                          Conditions:
                            - Field: service.name
                            - Operator: =
                            - Value: service-x
                          Drop: true
                        - Name: All the important errors
                          Sampler:
                            EMADynamicSampler:
                              GoalSampleRate: 3
                              FieldList:
                                  - exception.type
                                  - error.message

Describe alternatives you've considered

We could probably also do something similar by allowing rules to have layered conditions, where some can be scoped to span and some to the trace, and then also allowing for OR conditioning rather than the AND conditioning we do.

Additional context

Haven't heard this from customers really, but was an interesting thought I had that sprung from some questions I'd received.

@tdarwin tdarwin added the type: enhancement New feature or request label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant