From afcf6acc028fdda27b8c0a4b1cd9c143113d8536 Mon Sep 17 00:00:00 2001 From: Adlotsof Date: Mon, 4 Nov 2024 15:34:21 +0100 Subject: [PATCH] address review comments --- .../components/otelcol/otelcol.exporter.splunkhec.md | 8 ++++---- .../otelcol/exporter/splunkhec/config/splunkhec.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sources/reference/components/otelcol/otelcol.exporter.splunkhec.md b/docs/sources/reference/components/otelcol/otelcol.exporter.splunkhec.md index 01214d22da..f5ac4d280d 100644 --- a/docs/sources/reference/components/otelcol/otelcol.exporter.splunkhec.md +++ b/docs/sources/reference/components/otelcol/otelcol.exporter.splunkhec.md @@ -134,9 +134,9 @@ Name | Type | Description `read_buffer_size` | `int` | Size of the read buffer the HTTP client uses for reading server responses. | `0` | no `write_buffer_size` | `int` | Size of the write buffer the HTTP client uses for writing requests. | `0` | no `timeout` | `duration` | Time to wait before marking a request as failed. | `"15s"` | no -`max_idle_conns` | `int` | Limits the number of idle HTTP connections the client can keep open. | `nil` | no -`max_idle_conns_per_host` | `int` | Limits the number of idle HTTP connections the host can keep open. | `nil` | no -`max_conns_per_host` | `int` | Limits the total (dialing,active, and idle) number of connections per host. | `nil` | no +`max_idle_conns` | `int` | Limits the number of idle HTTP connections the client can keep open. | `100` | no +`max_idle_conns_per_host` | `int` | Limits the number of idle HTTP connections the host can keep open. | `2` | no +`max_conns_per_host` | `int` | Limits the total (dialing,active, and idle) number of connections per host. Zero means no limit | `0` | no `idle_conn_timeout` | `duration` | Time to wait before an idle connection closes itself. | `"45s"` | no `disable_keep_alives` | `bool` | Disable HTTP keep-alive. | `false` | no `insecure_skip_verify` | `bool` | Ignores insecure server TLS certificates. | `false` | no @@ -215,7 +215,7 @@ otelcol.exporter.splunkhec "default" { index = "metrics" splunk_app_name = "OpenTelemetry-Collector Splunk Exporter" splunk_app_version = "v0.0.1" - +z otel_to_hec_fields { severity_text = "otel.log.severity.text" severity_number = "otel.log.severity.number" diff --git a/internal/component/otelcol/exporter/splunkhec/config/splunkhec.go b/internal/component/otelcol/exporter/splunkhec/config/splunkhec.go index 4e68f50e51..a9c5199bf9 100644 --- a/internal/component/otelcol/exporter/splunkhec/config/splunkhec.go +++ b/internal/component/otelcol/exporter/splunkhec/config/splunkhec.go @@ -247,7 +247,7 @@ func (args *SplunkConf) Validate() error { if args.Token == "" { return errors.New("missing splunk token") } - if !(args.LogDataEnabled || args.ProfilingDataEnabled) { + if !args.LogDataEnabled && !args.ProfilingDataEnabled { return errors.New("at least one of log_data_enabled or profiling_data_enabled must be enabled") } if args.MaxContentLengthLogs > 838860800 {