-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
config.yaml
59 lines (56 loc) · 2.9 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
# 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.
hash_seed: 22
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.
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 ]