Skip to content

unify the percentage expression into one in tail_sampling_config.yaml #35885

@diguage

Description

@diguage

Component(s)

processor/tailsampling

Describe the issue you're reporting

I run the Tail Sampling and I read the example config: processor/tailsamplingprocessor/testdata/tail_sampling_config.yaml .

In this file, there are two ways to express percentages. It might be better to unify the percentage expression into one.

tail_sampling:
  decision_wait: 10s
  num_traces: 100
  expected_new_traces_per_sec: 10
  decision_cache:
    sampled_cache_size: 500
  policies:
    [
        {
          name: test-policy-4,
          type: probabilistic,
          probabilistic: {
            hash_salt: "custom-salt", 
            ##################################
            sampling_percentage: 0.1  # This is a float number.
          }
        },
      {
        name: composite-policy-1,
        type: composite,
        composite:
          {
            max_total_spans_per_second: 1000,
            policy_order: [ test-composite-policy-1, test-composite-policy-2, test-composite-policy-3 ],
            composite_sub_policy:
              [
                {
                  name: test-composite-policy-1,
                  type: numeric_attribute,
                  numeric_attribute: { key: key1, min_value: 50, max_value: 100 }
                },
                {
                  name: test-composite-policy-2,
                  type: string_attribute,
                  string_attribute: { key: key2, values: [ value1, value2 ] }
                }
              ],
            rate_allocation:
              [
                {
                  policy: test-composite-policy-1,
                  ##################################
                  percent: 50  # This is an integer number.
                },
                {
                  policy: test-composite-policy-2,
                  ##################################
                  percent: 25 # This is an integer number.
                }
              ]
          }
      },
    ]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions