From 79d95af138ef4060adb1f5950eb628b4efce5aca Mon Sep 17 00:00:00 2001 From: Hyunuk Lim Date: Mon, 4 Oct 2021 01:45:47 -0700 Subject: [PATCH] fix: remove squash on configtls.TLSClientSetting for observiqexporter (#5540) This PR removes squash on`configtls.TLSClientSetting` and update corresponding yaml file for observiqexporter. See history [here](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/5454) **Link to tracking Issue:** #5433 --- CHANGELOG.md | 1 + exporter/observiqexporter/README.md | 9 +++++---- exporter/observiqexporter/config.go | 2 +- exporter/observiqexporter/testdata/config.yaml | 7 ++++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 845822a669bb..b15d55410f15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## 🛑 Breaking changes 🛑 +- Remove squash on configtls.TLSClientSetting for observiqexporter (#5540) - Remove squash on configtls.TLSClientSetting for AWS components (#5454) - Move `k8sprocessor` to `k8sattributesprocessor`. - Rename `k8s_tagger` configuration `k8sattributes`. diff --git a/exporter/observiqexporter/README.md b/exporter/observiqexporter/README.md index 97a3ba7f2d61..3905698fb7b8 100644 --- a/exporter/observiqexporter/README.md +++ b/exporter/observiqexporter/README.md @@ -17,10 +17,11 @@ The following configuration options can also be configured: - `agent_id` (default: uuid generated from os.Hostname): ID for identifying the collector deployment. Ideally, this is a unique uuid, for uniquely identifying specific deployments of the agent. By default, this will be a uuid generated from the hostname. If the hostname cannot be determined, it will be `00000000-0000-0000-0000-000000000000` - `agent_name` (default: os.Hostname): Name for identifying the collector deployment. This is the friendly name of the deployment. Defaults to the hostname; If the hostname cannot be determined, `otel collector` will be used as a fallback. - `timeout` (default: `10s`): Http timeout when sending data. -- `insecure_skip_verify` (default: `false`): Whether to skip checking the certificate of the endpoint when sending data over HTTPS. -- `ca_file` (no default) Path to the CA cert to verify the server being connected to. -- `cert_file` (no default) Path to the TLS cert to use for client connections when TLS client auth is required. -- `key_file` (no default) Path to the TLS key to use for TLS required connections. +- `tls`: + - `insecure_skip_verify` (default: `false`): Whether to skip checking the certificate of the endpoint when sending data over HTTPS. + - `ca_file` (no default) Path to the CA cert to verify the server being connected to. + - `cert_file` (no default) Path to the TLS cert to use for client connections when TLS client auth is required. + - `key_file` (no default) Path to the TLS key to use for TLS required connections. In addition, this exporter offers queued retry which is enabled by default. Information about queued retry configuration parameters can be found diff --git a/exporter/observiqexporter/config.go b/exporter/observiqexporter/config.go index 41c33176856a..4adad489cbac 100644 --- a/exporter/observiqexporter/config.go +++ b/exporter/observiqexporter/config.go @@ -32,7 +32,7 @@ type Config struct { exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` // TLS Settings for http client to use when sending logs to endpoint - TLSSetting configtls.TLSClientSetting `mapstructure:",squash"` + TLSSetting configtls.TLSClientSetting `mapstructure:"tls,omitempty"` // API key for authenticating with ingestion endpoint (required if no SecretKey) APIKey string `mapstructure:"api_key"` // Secret key for authenticating with the ingestion endpoint (required if no APIKey) diff --git a/exporter/observiqexporter/testdata/config.yaml b/exporter/observiqexporter/testdata/config.yaml index 74cf930eff30..7f4472bb7475 100644 --- a/exporter/observiqexporter/testdata/config.yaml +++ b/exporter/observiqexporter/testdata/config.yaml @@ -13,9 +13,10 @@ exporters: timeout: 10s agent_id: "08e097a6-8580-43f6-b4f5-9d3b4eb2d962" agent_name: "otel-collector-1" - ca_file: "" - cert_file: "" - key_file: "" + tls: + ca_file: "" + cert_file: "" + key_file: "" sending_queue: enabled: true num_consumers: 2