processors: # The probabilistic_sampler sets trace sampling by hashing the trace id of # each span and making the sampling decision based on the hashed value. It # also implements the "sampling.priority" semantic convention as defined by # OpenTracing. See # https://github.com/opentracing/specification/blob/master/semantic_conventions.md#span-tags-table # The "sampling.priority" semantics have priority over trace id hashing and # can be used to control if given spans are sampled, ie.: forwarded, or not. probabilistic_sampler: # the percentage rate at which traces are going to be sampled. Defaults to # zero, i.e.: no sample. Values greater or equal 100 are treated as # "sample all traces". sampling_percentage: 15.3 # mode determines the type of sampling logic applied, see the README for details. mode: "proportional" probabilistic_sampler/logs: # the percentage rate at which logs are going to be sampled. Defaults to # zero, i.e.: no sample. Values greater or equal 100 are treated as # "sample all logs". sampling_percentage: 15.3 # hash_seed allows one to configure the hashing seed. This is important in # scenarios where multiple layers of collectors are used to achieve the # desired sampling rate, eg.: 10% on first layer and 10% on the # second, resulting in an overall sampling rate of 1% (10% x 10%). # If all layers use the same seed, all data passing one layer will also pass # the next one, independent of the configured sampling rate. Having different # seeds at different layers ensures that sampling rate in each layer work as # intended. # # setting the hash_seed != 0 causes hash_seed to be selected by default hash_seed: 22 # attribute_source defines where to look for the attribute in from_attribute. The allowed values are `traceID` or `record`. attribute_source: "record" # from_attribute allows to use a log record attribute after the `foo` key # to be used to compute the sampling hash of the log record instead of trace id, if trace id is absent or trace id sampling is disabled. from_attribute: "foo" # sampling_priority allows to use a log record attribute designed by the `bar` key # to be used as the sampling priority of the log record. sampling_priority: "bar" exporters: nop: service: pipelines: traces: receivers: [nop] processors: [probabilistic_sampler] exporters: [nop] logs: receivers: [ nop ] processors: [ probabilistic_sampler/logs ] exporters: [ nop ]