-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Labels
Github SyncedIssue is synced with a private project management tool.Issue is synced with a private project management tool.type: bugSomething isn't workingSomething isn't working
Description
Versions
- Go: N/A
- Refinery: 3.0
Steps to reproduce
- Define a rule
rules:
RulesVersion: 2
Samplers:
__default__:
RulesBasedSampler:
Rules:
...
- Name: Small Fast Traces
Scope: span
Conditions:
- Operator: has-root-span
Value: true
- Field: root.duration_ms
Operator: '<'
Value: 1000
Datatype: int
- Field: "?.NUM_DESCENDANTS"
Operator: '<='
Value: 2
Datatype: int
Sampler:
EMADynamicSampler:
GoalSampleRate: 1000
FieldList:
- service.name
- name
...Notice that the rule has has-root-span: true
and also root.duration_ms on certain condition. When testing the refinery, even though a trace would have the matching condition, the rule would not be triggered, and the trace would go into the default sampler.
However, when I removed the has-root-span condition, the sampling would work fine, getting triggered with trace having shorter duration than 1000 and also num of descendants less than 2.
Additional context
Logically, the above condition should work, as the subject trace has a root span, as well as descendants of less than 2, and the duration_ms of the root span is less than 1000. Therefore, it feels likely to be a bug.
Metadata
Metadata
Assignees
Labels
Github SyncedIssue is synced with a private project management tool.Issue is synced with a private project management tool.type: bugSomething isn't workingSomething isn't working