@@ -21,6 +21,7 @@ import (
21
21
"go.opentelemetry.io/collector/config/configopaque"
22
22
)
23
23
24
+ // TimeoutSettings for timeout. The timeout applies to individual attempts to send data to the backend.
24
25
type TimeoutSettings struct {
25
26
// Timeout is the timeout for every attempt to send data to the backend.
26
27
// A zero timeout means no timeout.
@@ -29,12 +30,18 @@ type TimeoutSettings struct {
29
30
30
31
// QueueSettings defines configuration for queueing batches before sending to the consumerSender.
31
32
type QueueSettings struct {
32
- // NumConsumers is the number of consumers from the queue.
33
+ // NumConsumers is the number of consumers from the queue. Defaults to 10.
34
+ // If batching is enabled, a combined batch cannot contain more requests than the number of consumers.
35
+ // So it's recommended to set higher number of consumers if batching is enabled.
33
36
NumConsumers * int `json:"num_consumers,omitempty"`
34
37
35
38
// QueueSize is the maximum number of batches allowed in queue at a given time.
36
39
// Default value is 100.
37
40
QueueSize * int `json:"queue_size,omitempty"`
41
+
42
+ // Blocking controls the queue behavior when full.
43
+ // If true it blocks until enough space to add the new request to the queue.
44
+ Blocking * bool `json:"blocking,omitempty"`
38
45
}
39
46
40
47
// BackOffConfig defines configuration for retrying batches in case of export failure.
@@ -122,11 +129,9 @@ type TLSClientSetting struct {
122
129
123
130
// These are config options specific to client connections.
124
131
125
- // In gRPC when set to true, this is used to disable the client transport security.
126
- // See https://godoc.org/google.golang.org/grpc#WithInsecure.
127
- // In HTTP, this disables verifying the server's certificate chain and host name
128
- // (InsecureSkipVerify in the tls Config). Please refer to
129
- // https://godoc.org/crypto/tls#Config for more information.
132
+ // In gRPC and HTTP when set to true, this is used to disable the client transport security.
133
+ // See https://godoc.org/google.golang.org/grpc#WithInsecure for gRPC.
134
+ // Please refer to https://godoc.org/crypto/tls#Config for more information.
130
135
// (optional, default false)
131
136
Insecure bool `json:"insecure,omitempty"`
132
137
@@ -151,6 +156,10 @@ type TLSSetting struct {
151
156
// In memory PEM encoded cert. (optional)
152
157
CAPem string `json:"ca_pem,omitempty"`
153
158
159
+ // If true, load system CA certificates pool in addition to the certificates
160
+ // configured in this struct.
161
+ IncludeSystemCACertsPool bool `json:"include_system_ca_certs_pool,omitempty"`
162
+
154
163
// Path to the TLS cert to use for TLS required connections. (optional)
155
164
CertFile string `json:"cert_file,omitempty"`
156
165
@@ -171,17 +180,37 @@ type TLSSetting struct {
171
180
// If not set, refer to crypto/tls for defaults. (optional)
172
181
MaxVersion string `json:"max_version,omitempty"`
173
182
183
+ // CipherSuites is a list of TLS cipher suites that the TLS transport can use.
184
+ // If left blank, a safe default list is used.
185
+ // See https://go.dev/src/crypto/tls/cipher_suites.go for a list of supported cipher suites.
186
+ CipherSuites []string `json:"cipher_suites,omitempty"`
187
+
174
188
// ReloadInterval specifies the duration after which the certificate will be reloaded
175
189
// If not set, it will never be reloaded (optional)
176
190
ReloadInterval time.Duration `json:"reload_interval,omitempty"`
191
+
192
+ // contains the elliptic curves that will be used in
193
+ // an ECDHE handshake, in preference order
194
+ // Defaults to empty list and "crypto/tls" defaults are used, internally.
195
+ CurvePreferences []string `json:"curve_preferences,omitempty"`
177
196
}
178
197
179
198
type Authentication struct {
180
199
// AuthenticatorID specifies the name of the extension to use in order to authenticate the incoming data point.
181
200
AuthenticatorID * string `json:"authenticator,omitempty"`
182
201
}
183
202
184
- // ClientConfig defines settings for creating an HTTP client.
203
+ type CompressionParams struct {
204
+ Level * int `json:"level,omitempty"`
205
+ }
206
+
207
+ // CookiesConfig defines the configuration of the HTTP client regarding cookies served by the server.
208
+ type CookiesConfig struct {
209
+ // Enabled if true, cookies from HTTP responses will be reused in further HTTP requests with the same server.
210
+ Enabled bool `json:"enabled,omitempty"`
211
+ }
212
+
213
+ // HTTPClientConfig defines settings for creating an HTTP client.
185
214
type HTTPClientConfig struct {
186
215
// The target URL to send data to (e.g.: http://some.url:9411/v1/traces).
187
216
Endpoint * string `json:"endpoint,omitempty"`
@@ -193,12 +222,15 @@ type HTTPClientConfig struct {
193
222
TLSSetting * TLSClientSetting `json:"tls,omitempty"`
194
223
195
224
// ReadBufferSize for HTTP client. See http.Transport.ReadBufferSize.
225
+ // Default is 0.
196
226
ReadBufferSize * int `json:"read_buffer_size,omitempty"`
197
227
198
228
// WriteBufferSize for HTTP client. See http.Transport.WriteBufferSize.
229
+ // Default is 0.
199
230
WriteBufferSize * int `json:"write_buffer_size,omitempty"`
200
231
201
232
// Timeout parameter configures `http.Client.Timeout`.
233
+ // Default is 0 (unlimited).
202
234
Timeout * time.Duration `json:"timeout,omitempty"`
203
235
204
236
// Additional headers attached to each HTTP request sent by the client.
@@ -212,21 +244,24 @@ type HTTPClientConfig struct {
212
244
// The compression key for supported compression types within collector.
213
245
Compression * configcompression.Type `json:"compression,omitempty"`
214
246
247
+ // Advanced configuration options for the Compression
248
+ CompressionParams * CompressionParams `json:"compression_params,omitempty"`
249
+
215
250
// MaxIdleConns is used to set a limit to the maximum idle HTTP connections the client can keep open.
216
- // There's an already set value, and we want to override it only if an explicit value provided
251
+ // By default, it is set to 100.
217
252
MaxIdleConns * int `json:"max_idle_conns,omitempty"`
218
253
219
254
// MaxIdleConnsPerHost is used to set a limit to the maximum idle HTTP connections the host can keep open.
220
- // There's an already set value, and we want to override it only if an explicit value provided
255
+ // By default, it is set to [http.DefaultTransport.MaxIdleConnsPerHost].
221
256
MaxIdleConnsPerHost * int `json:"max_idle_conns_per_host,omitempty"`
222
257
223
258
// MaxConnsPerHost limits the total number of connections per host, including connections in the dialing,
224
259
// active, and idle states.
225
- // There's an already set value, and we want to override it only if an explicit value provided
260
+ // By default, it is set to [http.DefaultTransport.MaxConnsPerHost].
226
261
MaxConnsPerHost * int `json:"max_conns_per_host,omitempty"`
227
262
228
263
// IdleConnTimeout is the maximum amount of time a connection will remain open before closing itself.
229
- // There's an already set value, and we want to override it only if an explicit value provided
264
+ // By default, it is set to [http.DefaultTransport.IdleConnTimeout]
230
265
IdleConnTimeout * time.Duration `json:"idle_conn_timeout,omitempty"`
231
266
232
267
// DisableKeepAlives, if true, disables HTTP keep-alives and will only use the connection to the server
@@ -247,4 +282,7 @@ type HTTPClientConfig struct {
247
282
// HTTP2PingTimeout if there's no response to the ping within the configured value, the connection will be closed.
248
283
// If not set or set to 0, it defaults to 15s.
249
284
HTTP2PingTimeout * time.Duration `json:"http2_ping_timeout,omitempty"`
285
+
286
+ // Cookies configures the cookie management of the HTTP client.
287
+ Cookies * CookiesConfig `json:"cookies,omitempty"`
250
288
}
0 commit comments