@@ -23,101 +23,101 @@ import (
2323type TimeoutSettings struct {
2424 // Timeout is the timeout for every attempt to send data to the backend.
2525 // A zero timeout means no timeout.
26- Timeout time.Duration `json:"timeout,omitempty"`
26+ Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" `
2727}
2828
2929// QueueSettings defines configuration for queueing batches before sending to the consumerSender.
3030type QueueSettings struct {
3131 // Enabled indicates whether to not enqueue batches before sending to the consumerSender.
32- Enabled bool `json:"enabled,omitempty"`
32+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty" `
3333 // NumConsumers is the number of consumers from the queue.
34- NumConsumers int `json:"num_consumers,omitempty"`
34+ NumConsumers int `json:"num_consumers,omitempty" yaml:"num_consumers,omitempty" `
3535 // QueueSize is the maximum number of batches allowed in queue at a given time.
36- QueueSize int `json:"queue_size,omitempty"`
36+ QueueSize int `json:"queue_size,omitempty" yaml:"queue_size,omitempty" `
3737 // StorageID if not empty, enables the persistent storage and uses the component specified
3838 // as a storage extension for the persistent queue
39- StorageID string `json:"storage,omitempty"` //TODO this is *component.ID at Otel
39+ StorageID string `json:"storage,omitempty" yaml:"storage,omitempty" ` //TODO this is *component.ID at Otel
4040}
4141
4242// BackOffConfig defines configuration for retrying batches in case of export failure.
4343// The current supported strategy is exponential backoff.
4444type BackOffConfig struct {
4545 // Enabled indicates whether to not retry sending batches in case of export failure.
46- Enabled bool `json:"enabled,omitempty"`
46+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty" `
4747 // InitialInterval the time to wait after the first failure before retrying.
48- InitialInterval time.Duration `json:"initial_interval,omitempty"`
48+ InitialInterval time.Duration `json:"initial_interval,omitempty" yaml:"initial_interval,omitempty" `
4949 // RandomizationFactor is a random factor used to calculate next backoffs
5050 // Randomized interval = RetryInterval * (1 ± RandomizationFactor)
51- RandomizationFactor string `json:"randomization_factor,omitempty"`
51+ RandomizationFactor string `json:"randomization_factor,omitempty" yaml:"randomization_factor,omitempty" `
5252 // Multiplier is the value multiplied by the backoff interval bounds
53- Multiplier string `json:"multiplier,omitempty"`
53+ Multiplier string `json:"multiplier,omitempty" yaml:"multiplier,omitempty" `
5454 // MaxInterval is the upper bound on backoff interval. Once this value is reached the delay between
5555 // consecutive retries will always be `MaxInterval`.
56- MaxInterval time.Duration `json:"max_interval,omitempty"`
56+ MaxInterval time.Duration `json:"max_interval,omitempty" yaml:"max_interval,omitempty" `
5757 // MaxElapsedTime is the maximum amount of time (including retries) spent trying to send a request/batch.
5858 // Once this value is reached, the data is discarded. If set to 0, the retries are never stopped.
59- MaxElapsedTime time.Duration `json:"max_elapsed_time,omitempty"`
59+ MaxElapsedTime time.Duration `json:"max_elapsed_time,omitempty" yaml:"max_elapsed_time,omitempty" `
6060}
6161
6262// KeepaliveClientConfig exposes the keepalive.ClientParameters to be used by the exporter.
6363// Refer to the original data-structure for the meaning of each parameter:
6464// https://godoc.org/google.golang.org/grpc/keepalive#ClientParameters
6565type KeepaliveClientConfig struct {
66- Time time.Duration `json:"time,omitempty"`
67- Timeout time.Duration `json:"timeout,omitempty"`
68- PermitWithoutStream bool `json:"permit_without_stream,omitempty"`
66+ Time time.Duration `json:"time,omitempty" yaml:"time,omitempty" `
67+ Timeout time.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty" `
68+ PermitWithoutStream bool `json:"permit_without_stream,omitempty" yaml:"permit_without_stream,omitempty" `
6969}
7070
7171// GRPCClientSettings defines common settings for a gRPC client configuration.
7272type GRPCClientSettings struct {
7373 // The target to which the exporter is going to send traces or metrics,
7474 // using the gRPC protocol. The valid syntax is described at
7575 // https://github.com/grpc/grpc/blob/master/doc/naming.md.
76- Endpoint string `json:"endpoint"`
76+ Endpoint string `json:"endpoint" yaml:"endpoint" `
7777
7878 // The compression key for supported compression types within collector.
79- Compression configcompression.CompressionType `json:"compression,omitempty"`
79+ Compression configcompression.CompressionType `json:"compression,omitempty" yaml:"compression,omitempty" `
8080
8181 // TLSSetting struct exposes TLS client configuration.
82- TLSSetting TLSClientSetting `json:"tls,omitempty"`
82+ TLSSetting TLSClientSetting `json:"tls,omitempty" yaml:"tls,omitempty" `
8383
8484 // The keepalive parameters for gRPC client. See grpc.WithKeepaliveParams.
8585 // (https://godoc.org/google.golang.org/grpc#WithKeepaliveParams).
86- Keepalive * KeepaliveClientConfig `json:"keepalive,omitempty"`
86+ Keepalive * KeepaliveClientConfig `json:"keepalive,omitempty" yaml:"keepalive,omitempty" `
8787
8888 // ReadBufferSize for gRPC client. See grpc.WithReadBufferSize.
8989 // (https://godoc.org/google.golang.org/grpc#WithReadBufferSize).
90- ReadBufferSize int `json:"read_buffer_size,omitempty"`
90+ ReadBufferSize int `json:"read_buffer_size,omitempty" yaml:"read_buffer_size,omitempty" `
9191
9292 // WriteBufferSize for gRPC gRPC. See grpc.WithWriteBufferSize.
9393 // (https://godoc.org/google.golang.org/grpc#WithWriteBufferSize).
94- WriteBufferSize int `json:"write_buffer_size,omitempty"`
94+ WriteBufferSize int `json:"write_buffer_size,omitempty" yaml:"write_buffer_size,omitempty" `
9595
9696 // WaitForReady parameter configures client to wait for ready state before sending data.
9797 // (https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md)
98- WaitForReady bool `json:"wait_for_ready,omitempty"`
98+ WaitForReady bool `json:"wait_for_ready,omitempty" yaml:"wait_for_ready,omitempty" `
9999
100100 // The headers associated with gRPC requests.
101- Headers map [string ]string `json:"headers,omitempty"`
101+ Headers map [string ]string `json:"headers,omitempty" yaml:"headers,omitempty" `
102102
103103 // Sets the balancer in grpclb_policy to discover the servers. Default is pick_first.
104104 // https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md
105- BalancerName string `json:"balancer_name,omitempty"`
105+ BalancerName string `json:"balancer_name,omitempty" yaml:"balancer_name,omitempty" `
106106
107107 // WithAuthority parameter configures client to rewrite ":authority" header
108108 // (godoc.org/google.golang.org/grpc#WithAuthority)
109- Authority string `json:"authority,omitempty"`
109+ Authority string `json:"authority,omitempty" yaml:"authority,omitempty" `
110110
111111 // Auth configuration for outgoing RPCs.
112- Auth string `json:"auth,omitempty"` //TODO this is a reference *configauth.Authentication
112+ Auth string `json:"auth,omitempty" yaml:"auth,omitempty" ` //TODO this is a reference *configauth.Authentication
113113}
114114
115115// TLSClientSetting contains TLS configurations that are specific to client
116116// connections in addition to the common configurations. This should be used by
117117// components configuring TLS client connections.
118118type TLSClientSetting struct {
119119 // squash ensures fields are correctly decoded in embedded struct.
120- // TLSSetting `json:",inline"`
120+ TLSSetting `json:",inline" yaml :",inline"`
121121
122122 // These are config options specific to client connections.
123123
@@ -127,13 +127,13 @@ type TLSClientSetting struct {
127127 // (InsecureSkipVerify in the tls Config). Please refer to
128128 // https://godoc.org/crypto/tls#Config for more information.
129129 // (optional, default false)
130- Insecure bool `json:"insecure,omitempty"`
130+ Insecure bool `json:"insecure,omitempty" yaml:"insecure,omitempty" `
131131 // InsecureSkipVerify will enable TLS but not verify the certificate.
132- InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty"`
132+ InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty" yaml:"insecure_skip_verify,omitempty" `
133133 // ServerName requested by client for virtual hosting.
134134 // This sets the ServerName in the TLSConfig. Please refer to
135135 // https://godoc.org/crypto/tls#Config for more information. (optional)
136- ServerName string `json:"server_name_override,omitempty"`
136+ ServerName string `json:"server_name_override,omitempty" yaml:"server_name_override,omitempty" `
137137}
138138
139139// TLSSetting exposes the common client and server TLS configurations.
@@ -143,32 +143,32 @@ type TLSSetting struct {
143143 // Path to the CA cert. For a client this verifies the server certificate.
144144 // For a server this verifies client certificates. If empty uses system root CA.
145145 // (optional)
146- CAFile string `json:"ca_file,omitempty"`
146+ CAFile string `json:"ca_file,omitempty" yaml:"ca_file,omitempty" `
147147
148148 // In memory PEM encoded cert. (optional)
149- CAPem string `json:"ca_pem,omitempty"`
149+ CAPem string `json:"ca_pem,omitempty" yaml:"ca_pem,omitempty" `
150150
151151 // Path to the TLS cert to use for TLS required connections. (optional)
152- CertFile string `json:"cert_file,omitempty"`
152+ CertFile string `json:"cert_file,omitempty" yaml:"cert_file,omitempty" `
153153
154154 // In memory PEM encoded TLS cert to use for TLS required connections. (optional)
155- CertPem string `json:"cert_pem,omitempty"`
155+ CertPem string `json:"cert_pem,omitempty" yaml:"cert_pem,omitempty" `
156156
157157 // Path to the TLS key to use for TLS required connections. (optional)
158- KeyFile string `json:"key_file,omitempty"`
158+ KeyFile string `json:"key_file,omitempty" yaml:"key_file,omitempty" `
159159
160160 // In memory PEM encoded TLS key to use for TLS required connections. (optional)
161- KeyPem string `json:"key_pem,omitempty"`
161+ KeyPem string `json:"key_pem,omitempty" yaml:"key_pem,omitempty" `
162162
163163 // MinVersion sets the minimum TLS version that is acceptable.
164164 // If not set, TLS 1.2 will be used. (optional)
165- MinVersion string `json:"min_version,omitempty"`
165+ MinVersion string `json:"min_version,omitempty" yaml:"min_version,omitempty" `
166166
167167 // MaxVersion sets the maximum TLS version that is acceptable.
168168 // If not set, refer to crypto/tls for defaults. (optional)
169- MaxVersion string `json:"max_version,omitempty"`
169+ MaxVersion string `json:"max_version,omitempty" yaml:"max_version,omitempty" `
170170
171171 // ReloadInterval specifies the duration after which the certificate will be reloaded
172172 // If not set, it will never be reloaded (optional)
173- ReloadInterval time.Duration `json:"reload_interval,omitempty"`
173+ ReloadInterval time.Duration `json:"reload_interval,omitempty" yaml:"reload_interval,omitempty" `
174174}
0 commit comments