1
+ receivers :
2
+ otlp :
3
+ protocols :
4
+ grpc :
5
+ http :
6
+
7
+ processors :
8
+ memory_limiter :
9
+ check_interval : 1s
10
+ limit_percentage : 70
11
+ spike_limit_percentage : 20
12
+ batch :
13
+ send_batch_size : 10000
14
+ timeout : 10s
15
+ tail_sampling/storage :
16
+ decision_wait : 10s
17
+ expected_new_traces_per_sec : 10000
18
+ num_traces : 50000
19
+ policies :
20
+ [
21
+ # Exclude probes URLs
22
+ {
23
+ name : exclude-urls,
24
+ type : string_attribute,
25
+ string_attribute : { key: http.route, values: [ \/health.*, \/metrics, \/tenants, \/version, \/status ], enabled_regex_matching: true, invert_match: true }
26
+ },
27
+ # All error are sampled
28
+ {
29
+ name : error-status-codes,
30
+ type : numeric_attribute,
31
+ numeric_attribute : { key: http.status_code, min_value: 500, max_value: 599 }
32
+ },
33
+ # Always sample high latency traces that are not uploads
34
+ {
35
+ name : high-latency-excluding-uploads,
36
+ type : and,
37
+ and : {
38
+ and_sub_policy :
39
+ [
40
+ {
41
+ type : latency,
42
+ latency : { threshold_ms: 5000 }
43
+ },
44
+ # Exclude upload operations
45
+ {
46
+ type : string_attribute,
47
+ string_attribute : {
48
+ key : http.operation,
49
+ values : [ .*upload.* ],
50
+ enabled_regex_matching : true,
51
+ invert_match : true
52
+ }
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ # Always sample high latency uploads
58
+ {
59
+ name : high-latency-uploads,
60
+ type : and,
61
+ and : {
62
+ and_sub_policy :
63
+ [
64
+ {
65
+ type : latency,
66
+ latency : { threshold_ms: 300000 }
67
+ },
68
+ # Only upload operations
69
+ {
70
+ type : string_attribute,
71
+ string_attribute : {
72
+ key : http.operation,
73
+ values : [ .*upload.* ],
74
+ enabled_regex_matching : true,
75
+ }
76
+ }
77
+ ]
78
+ }
79
+ },
80
+ # Sample traces for tenants with default mode
81
+ # Default mode is the mode where the trace.mode attribute is set to basic
82
+ # and only 0.2 of traces are sampled for each tenant
83
+ {
84
+ name : sampling-basic-tenants,
85
+ type : and,
86
+ and : {
87
+ and_sub_policy :
88
+ [
89
+ {
90
+ # must have tenant.ref attribute
91
+ name : has-tenant-ref,
92
+ type : string_attribute,
93
+ string_attribute :
94
+ {
95
+ key : tenant.ref,
96
+ values : [ .* ],
97
+ enabled_regex_matching : true
98
+ },
99
+ },
100
+ {
101
+ # trace.mode = basic
102
+ name : trace-mode-default,
103
+ type : string_attribute,
104
+ string_attribute :
105
+ {
106
+ key : trace.mode,
107
+ values : [ basic ],
108
+ },
109
+ },
110
+ {
111
+ name : success-status-codes,
112
+ type : numeric_attribute,
113
+ numeric_attribute : { key: http.status_code, min_value: 200, max_value: 399 }
114
+ },
115
+ {
116
+ name : basic-sampling,
117
+ type : probabilistic,
118
+ probabilistic : {
119
+ sampling_percentage : 5
120
+ }
121
+ }
122
+ ]
123
+ }
124
+ },
125
+
126
+ # Sample traces for tenants with premium mode
127
+ # Premium mode sample 100% of traces for each tenant
128
+ {
129
+ name : sampling-premium-tenants,
130
+ type : and,
131
+ and : {
132
+ and_sub_policy :
133
+ [
134
+ {
135
+ # must have tenant.ref attribute
136
+ name : has-tenant-ref,
137
+ type : string_attribute,
138
+ string_attribute :
139
+ {
140
+ key : tenant.ref,
141
+ values : [ .* ],
142
+ enabled_regex_matching : true
143
+ },
144
+ },
145
+ {
146
+ # trace.mode = premium
147
+ name : trace-mode-default,
148
+ type : string_attribute,
149
+ string_attribute :
150
+ {
151
+ key : trace.mode,
152
+ values : [ full ],
153
+ },
154
+ },
155
+ {
156
+ name : success-status-codes,
157
+ type : numeric_attribute,
158
+ numeric_attribute : { key: http.status_code, min_value: 200, max_value: 399 }
159
+ },
160
+ {
161
+ name : full-sampling,
162
+ type : probabilistic,
163
+ probabilistic : {
164
+ sampling_percentage : 100
165
+ }
166
+ }
167
+ ]
168
+ }
169
+ }
170
+ ]
171
+
172
+ exporters :
173
+ otlp/jaeger :
174
+ endpoint : " jaeger:4317"
175
+ tls :
176
+ insecure : true
177
+
178
+ service :
179
+ pipelines :
180
+ traces :
181
+ receivers : [otlp]
182
+ processors : [memory_limiter, tail_sampling/storage, batch]
183
+ exporters : [otlp/jaeger]
0 commit comments