You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// WakeupLen is used to calculate the wakeup_data_bytes for the ringbuf
124
-
ifc.WakeupLen<0 {
125
-
returnerrors.New("ebpf.wakeup_len in the YAML configuration file or OTEL_EBPF_BPF_WAKEUP_LEN must be at least 1")
126
-
}
127
-
ifc.BatchLength<1 {
128
-
returnerrors.New("ebpf.batch_length in the YAML configuration file or OTEL_EBPF_BPF_BATCH_LENGTH must be at least 1")
129
-
}
130
-
131
-
ifc.BatchTimeout<=0 {
132
-
returnerrors.New("ebpf.batch_timeout in the YAML configuration file or OTEL_EBPF_BPF_BATCH_TIMEOUT must be greater than 0")
133
-
}
134
-
135
-
ifc.HTTPRequestTimeout<0 {
136
-
returnerrors.New("ebpf.http_request_timeout in the YAML configuration file or OTEL_EBPF_BPF_HTTP_REQUEST_TIMEOUT must be greater than or equal to 0")
137
-
}
138
-
139
-
if!c.TCBackend.Valid() {
140
-
returnerrors.New("invalid ebpf.traffic_control_backend in the YAML configuration file or OTEL_EBPF_BPF_TC_BACKEND value, must be 'tc' or 'tcx' or 'auto'")
141
-
}
142
-
143
-
// remove after deleting ContextPropagationEnabled
121
+
// TODO remove after deleting ContextPropagationEnabled
returnerrors.New("ebpf.enable_context_propagation and ebpf.context_propagation in the YAML configuration file or OTEL_EBPF_BPF_ENABLE_CONTEXT_PROPAGATION and OTEL_EBPF_BPF_CONTEXT_PROPAGATION are mutually exclusive")
// remove after deleting ContextPropagationEnabled
150
132
ifc.ContextPropagationEnabled {
151
133
slog.Warn("DEPRECATION NOTICE: 'ebpf.enable_context_propagation' configuration option has been "+
152
134
"deprecated and will be removed in the future - use 'ebpf.context_propagation' instead")
153
135
c.ContextPropagation=ContextPropagationAll
154
136
}
155
-
156
-
iferr:=c.RedisDBCache.Validate(); err!=nil {
157
-
returnerr
158
-
}
159
-
160
-
iferr:=c.BufferSizes.Validate(); err!=nil {
161
-
returnerr
162
-
}
163
-
164
-
ifc.MySQLPreparedStatementsCacheSize<=0 {
165
-
returnerrors.New("ebpf.mysql_prepared_statements_cache_size in the YAML configuration file or OTEL_EBPF_BPF_MYSQL_PREPARED_STATEMENTS_CACHE_SIZE must be greater than 0")
166
-
}
167
-
168
-
ifc.PostgresPreparedStatementsCacheSize<=0 {
169
-
returnerrors.New("ebpf.postgres_prepared_statements_cache_size in the YAML configuration file or OTEL_EBPF_BPF_POSTGRES_PREPARED_STATEMENTS_CACHE_SIZE must be greater than 0")
170
-
}
171
-
172
-
ifc.KafkaTopicUUIDCacheSize<=0 {
173
-
returnerrors.New("ebpf.kafka_topic_uuid_cache_size in the YAML configuration file or OTEL_KAFKA_TOPIC_UUID_CACHE_SIZE must be greater than 0")
174
-
}
175
-
176
-
ifc.MongoRequestsCacheSize<=0 {
177
-
returnerrors.New("ebpf.mongo_requests_cache_size in the YAML configuration file or OTEL_EBPF_BPF_MONGO_REQUESTS_CACHE_SIZE must be greater than 0")
returnnil, fmt.Errorf("invalid context propagation mode: %d", m)
215
171
}
216
-
217
-
func (rRedisDBCacheConfig) Validate() error {
218
-
ifr.MaxSize<=0 {
219
-
returnerrors.New("ebpf.redis_db_cache.max_size in the YAML configuration file or OTEL_EBPF_BPF_REDIS_DB_CACHE_MAX_SIZE must be greater than 0")
220
-
}
221
-
returnnil
222
-
}
223
-
224
-
func (bEBPFBufferSizes) Validate() error {
225
-
ifb.HTTP>bufferSizeMax {
226
-
returnfmt.Errorf("ebpf.buffer_sizes.http in YAML configuration file or OTEL_EBPF_BPF_BUFFER_SIZE_HTTP too large: %d, max is %d", b.HTTP, bufferSizeMax)
227
-
}
228
-
ifb.MySQL>bufferSizeMax {
229
-
returnfmt.Errorf("ebpf.buffer_sizes.mysql in YAML configuration file or OTEL_EBPF_BPF_BUFFER_SIZE_MYSQL too large: %d, max is %d", b.MySQL, bufferSizeMax)
230
-
}
231
-
ifb.Postgres>bufferSizeMax {
232
-
returnfmt.Errorf("ebpf.buffer_sizes.postgres in YAML configuration file or OTEL_EBPF_BPF_BUFFER_SIZE_POSTGRES too large: %d, max is %d", b.Postgres, bufferSizeMax)
0 commit comments