-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Ref 1: open-telemetry/opentelemetry-collector-contrib#34085
Ref 2: open-telemetry/opentelemetry-collector-contrib#36673
Behavior:
In current used version (0.111.0), when And
sub-processor returns InvertNotSampled
, any other policies in major state, that returns IsSempled
will be ignored, which breaks documented behavior.
Example collector settings for proof this unexpected behavior:
### Total sampling must be "ALL", but now sampling only non-production, even if errors present, or probabilistic strikes as 100%
tail_sampling:
policies:
- name: error-policy
type: status_code
status_code:
status_codes: [ERROR]
- name: non-production-environment
type: and
and:
and_sub_policy:
- name: non-production-environment-sub
type: string_attribute
string_attribute:
key: deployment.environment
values: ["production"]
invert_match: true # <- Strikes here. InvertMatch returns InvertNotSampled in cases, when deployment.environment is "production", and "And" returns it too
- name: non-production-environment-always
type: always_sample
- name: production-environment
type: and
and:
and_sub_policy:
- name: production-environment-sub
type: string_attribute
string_attribute:
key: deployment.environment
values: ["production"]
- name: production-environment-probabilistic
type: probabilistic
probabilistic:
sampling_percentage: 100
Solution:
Update tailsamplingprocessor to 0.116.0 or higher.
Metadata
Metadata
Assignees
Labels
No labels