From 35397e0114d96f5411eb3e3c4dbe89023ee58481 Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Mon, 24 Nov 2025 17:10:57 +0530 Subject: [PATCH 1/9] support setting query parameters on outgoing bulk request --- exporter/elasticsearchexporter/bulkindexer.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/exporter/elasticsearchexporter/bulkindexer.go b/exporter/elasticsearchexporter/bulkindexer.go index 41a81e754ac8f..4ad4fc85cc870 100644 --- a/exporter/elasticsearchexporter/bulkindexer.go +++ b/exporter/elasticsearchexporter/bulkindexer.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "net/http" + "net/url" "regexp" "runtime" "strings" @@ -101,9 +102,24 @@ func bulkIndexerConfig(client esapi.Transport, config *Config, requireDataStream CompressionLevel: compressionLevel, PopulateFailedDocsInput: config.LogFailedDocsInput, IncludeSourceOnError: bulkIndexerIncludeSourceOnError(config.IncludeSourceOnError), + QueryParams: getQueryParamsFromEndpoint(config), } } +func getQueryParamsFromEndpoint(config *Config) (queryParams map[string][]string) { + endpoints, _ := config.endpoints() + // we check the query params set on the first endpoint only + // this is enough to replicate to all requests + parsedURL, _ := url.Parse(endpoints[0]) + + rawQuery := parsedURL.RawQuery + if rawQuery != "" { + queryParams, _ = url.ParseQuery(rawQuery) + } + + return queryParams +} + func bulkIndexerIncludeSourceOnError(includeSourceOnError *bool) docappender.Value { if includeSourceOnError == nil { return docappender.Unset From 12f942694f13fd6528687535d4623c0d28aefed2 Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Tue, 25 Nov 2025 17:05:05 +0530 Subject: [PATCH 2/9] update go-doc appender package --- exporter/elasticsearchexporter/bulkindexer_test.go | 12 ++++++++++++ exporter/elasticsearchexporter/go.mod | 6 +++--- exporter/elasticsearchexporter/go.sum | 12 ++++++------ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/exporter/elasticsearchexporter/bulkindexer_test.go b/exporter/elasticsearchexporter/bulkindexer_test.go index eae3cae9aff3b..e553b987755c1 100644 --- a/exporter/elasticsearchexporter/bulkindexer_test.go +++ b/exporter/elasticsearchexporter/bulkindexer_test.go @@ -186,6 +186,18 @@ func TestSyncBulkIndexer(t *testing.T) { } } +func TestQueryParamsParsedFromEndpoints(t *testing.T) { + client, err := elasticsearch.NewDefaultClient() + require.NoError(t, err) + cfg := createDefaultConfig().(*Config) + cfg.Endpoints = []string{"http://localhost:9200?pipeline=test-pipeline"} + + bi := bulkIndexerConfig(client, cfg, true) + require.Equal(t, map[string][]string{ + "pipeline": []string{"test-pipeline"}}, bi.QueryParams) + +} + func TestNewBulkIndexer(t *testing.T) { client, err := elasticsearch.NewDefaultClient() require.NoError(t, err) diff --git a/exporter/elasticsearchexporter/go.mod b/exporter/elasticsearchexporter/go.mod index 4e3abeb2159b7..e15728338c5e3 100644 --- a/exporter/elasticsearchexporter/go.mod +++ b/exporter/elasticsearchexporter/go.mod @@ -4,7 +4,7 @@ go 1.24.0 require ( github.com/cespare/xxhash/v2 v2.3.0 - github.com/elastic/go-docappender/v2 v2.11.3 + github.com/elastic/go-docappender/v2 v2.12.0 github.com/elastic/go-elasticsearch/v8 v8.19.0 github.com/elastic/go-freelru v0.16.0 github.com/elastic/go-structform v0.0.12 @@ -42,7 +42,7 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.38.0 go.opentelemetry.io/otel/trace v1.38.0 go.uber.org/goleak v1.3.0 - go.uber.org/zap v1.27.0 + go.uber.org/zap v1.27.1 golang.org/x/sync v0.18.0 ) @@ -50,7 +50,7 @@ require ( github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cilium/ebpf v0.20.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/elastic/elastic-transport-go/v8 v8.7.0 // indirect + github.com/elastic/elastic-transport-go/v8 v8.8.0 // indirect github.com/elastic/go-sysinfo v1.15.3 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/foxboron/go-tpm-keyfiles v0.0.0-20250903184740-5d135037bd4d // indirect diff --git a/exporter/elasticsearchexporter/go.sum b/exporter/elasticsearchexporter/go.sum index 6b5192f4efa25..3317a94b1e2b2 100644 --- a/exporter/elasticsearchexporter/go.sum +++ b/exporter/elasticsearchexporter/go.sum @@ -9,10 +9,10 @@ github.com/cilium/ebpf v0.20.0/go.mod h1:pzLjFymM+uZPLk/IXZUL63xdx5VXEo+enTzxkZX github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE= -github.com/elastic/elastic-transport-go/v8 v8.7.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= -github.com/elastic/go-docappender/v2 v2.11.3 h1:ighjWRnK31Z9pJvSUVPjLfmLg9IK5ZVQyS8eNPPnHJ0= -github.com/elastic/go-docappender/v2 v2.11.3/go.mod h1:psX8ExQqcRM0yliIEhLrXzrIYlXbqHfdt9aGVwPM2IQ= +github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo= +github.com/elastic/elastic-transport-go/v8 v8.8.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= +github.com/elastic/go-docappender/v2 v2.12.0 h1:4H5Ale36xmlSzJ8B4fpjNkvDcihEO22NnOFpJxoR/L0= +github.com/elastic/go-docappender/v2 v2.12.0/go.mod h1:TH6zt+utuXQ8wm+tor0zcrKlZFuLUzXo8UMaSvOhvis= github.com/elastic/go-elasticsearch/v8 v8.19.0 h1:VmfBLNRORY7RZL+9hTxBD97ehl9H8Nxf2QigDh6HuMU= github.com/elastic/go-elasticsearch/v8 v8.19.0/go.mod h1:F3j9e+BubmKvzvLjNui/1++nJuJxbkhHefbaT0kFKGY= github.com/elastic/go-freelru v0.16.0 h1:gG2HJ1WXN2tNl5/p40JS/l59HjvjRhjyAa+oFTRArYs= @@ -231,8 +231,8 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= From 11a6226f3f302e66898514ecd0a8dac823abf4da Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Tue, 25 Nov 2025 19:58:25 +0530 Subject: [PATCH 3/9] fix lint --- exporter/elasticsearchexporter/bulkindexer_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/exporter/elasticsearchexporter/bulkindexer_test.go b/exporter/elasticsearchexporter/bulkindexer_test.go index e553b987755c1..912c75d372ac5 100644 --- a/exporter/elasticsearchexporter/bulkindexer_test.go +++ b/exporter/elasticsearchexporter/bulkindexer_test.go @@ -194,8 +194,7 @@ func TestQueryParamsParsedFromEndpoints(t *testing.T) { bi := bulkIndexerConfig(client, cfg, true) require.Equal(t, map[string][]string{ - "pipeline": []string{"test-pipeline"}}, bi.QueryParams) - + "pipeline": []string{"test-pipeline"}}, bi.QueryParams) //nolint:gofumpt //query.Params is of []string type } func TestNewBulkIndexer(t *testing.T) { From 02153b2153db9100159c94c5ee3e0f9a79d0baad Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Wed, 26 Nov 2025 10:31:26 +0530 Subject: [PATCH 4/9] make gomodtidy --- exporter/elasticsearchexporter/integrationtest/go.mod | 4 ++-- exporter/elasticsearchexporter/integrationtest/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exporter/elasticsearchexporter/integrationtest/go.mod b/exporter/elasticsearchexporter/integrationtest/go.mod index 984b76af1254f..60586704d13be 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.mod +++ b/exporter/elasticsearchexporter/integrationtest/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasti go 1.24.0 require ( - github.com/elastic/go-docappender/v2 v2.11.3 + github.com/elastic/go-docappender/v2 v2.12.0 github.com/gorilla/mux v1.8.1 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.140.1 github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.140.1 @@ -50,7 +50,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc // indirect github.com/ebitengine/purego v0.9.0 // indirect - github.com/elastic/elastic-transport-go/v8 v8.7.0 // indirect + github.com/elastic/elastic-transport-go/v8 v8.8.0 // indirect github.com/elastic/go-elasticsearch/v8 v8.19.0 // indirect github.com/elastic/go-freelru v0.16.0 // indirect github.com/elastic/go-grok v0.3.1 // indirect diff --git a/exporter/elasticsearchexporter/integrationtest/go.sum b/exporter/elasticsearchexporter/integrationtest/go.sum index 54c12bc2c77c5..8a1e73327f1ad 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.sum +++ b/exporter/elasticsearchexporter/integrationtest/go.sum @@ -45,10 +45,10 @@ github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsY github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= github.com/ebitengine/purego v0.9.0 h1:mh0zpKBIXDceC63hpvPuGLiJ8ZAa3DfrFTudmfi8A4k= github.com/ebitengine/purego v0.9.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= -github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE= -github.com/elastic/elastic-transport-go/v8 v8.7.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= -github.com/elastic/go-docappender/v2 v2.11.3 h1:ighjWRnK31Z9pJvSUVPjLfmLg9IK5ZVQyS8eNPPnHJ0= -github.com/elastic/go-docappender/v2 v2.11.3/go.mod h1:psX8ExQqcRM0yliIEhLrXzrIYlXbqHfdt9aGVwPM2IQ= +github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo= +github.com/elastic/elastic-transport-go/v8 v8.8.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= +github.com/elastic/go-docappender/v2 v2.12.0 h1:4H5Ale36xmlSzJ8B4fpjNkvDcihEO22NnOFpJxoR/L0= +github.com/elastic/go-docappender/v2 v2.12.0/go.mod h1:TH6zt+utuXQ8wm+tor0zcrKlZFuLUzXo8UMaSvOhvis= github.com/elastic/go-elasticsearch/v8 v8.19.0 h1:VmfBLNRORY7RZL+9hTxBD97ehl9H8Nxf2QigDh6HuMU= github.com/elastic/go-elasticsearch/v8 v8.19.0/go.mod h1:F3j9e+BubmKvzvLjNui/1++nJuJxbkhHefbaT0kFKGY= github.com/elastic/go-freelru v0.16.0 h1:gG2HJ1WXN2tNl5/p40JS/l59HjvjRhjyAa+oFTRArYs= From a93aac9cc2cff3bc793928ddb6c8bb0d9b2e8d8e Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Wed, 26 Nov 2025 11:09:44 +0530 Subject: [PATCH 5/9] fix test --- exporter/elasticsearchexporter/bulkindexer.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/exporter/elasticsearchexporter/bulkindexer.go b/exporter/elasticsearchexporter/bulkindexer.go index 4ad4fc85cc870..68b7764d69aae 100644 --- a/exporter/elasticsearchexporter/bulkindexer.go +++ b/exporter/elasticsearchexporter/bulkindexer.go @@ -108,16 +108,19 @@ func bulkIndexerConfig(client esapi.Transport, config *Config, requireDataStream func getQueryParamsFromEndpoint(config *Config) (queryParams map[string][]string) { endpoints, _ := config.endpoints() - // we check the query params set on the first endpoint only - // this is enough to replicate to all requests - parsedURL, _ := url.Parse(endpoints[0]) - rawQuery := parsedURL.RawQuery - if rawQuery != "" { - queryParams, _ = url.ParseQuery(rawQuery) - } + if len(endpoints) != 0 { + // we check the query params set on the first endpoint only + // this is enough to replicate to all requests + parsedURL, _ := url.Parse(endpoints[0]) - return queryParams + rawQuery := parsedURL.RawQuery + if rawQuery != "" { + queryParams, _ = url.ParseQuery(rawQuery) + } + return queryParams + } + return nil } func bulkIndexerIncludeSourceOnError(includeSourceOnError *bool) docappender.Value { From 5badb1172b885ebdaaa9050e33fbe857efd800fa Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Thu, 27 Nov 2025 10:29:17 +0530 Subject: [PATCH 6/9] fix test --- exporter/elasticsearchexporter/bulkindexer_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exporter/elasticsearchexporter/bulkindexer_test.go b/exporter/elasticsearchexporter/bulkindexer_test.go index 912c75d372ac5..d0788a406eadf 100644 --- a/exporter/elasticsearchexporter/bulkindexer_test.go +++ b/exporter/elasticsearchexporter/bulkindexer_test.go @@ -194,7 +194,8 @@ func TestQueryParamsParsedFromEndpoints(t *testing.T) { bi := bulkIndexerConfig(client, cfg, true) require.Equal(t, map[string][]string{ - "pipeline": []string{"test-pipeline"}}, bi.QueryParams) //nolint:gofumpt //query.Params is of []string type + "pipeline": {"test-pipeline"}, + }, bi.QueryParams) } func TestNewBulkIndexer(t *testing.T) { From 9b02cf4c69ac35271a6892017066aa2bd5982d09 Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Thu, 27 Nov 2025 11:08:30 +0530 Subject: [PATCH 7/9] add changelog --- .chloggen/support-query-params.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .chloggen/support-query-params.yaml diff --git a/.chloggen/support-query-params.yaml b/.chloggen/support-query-params.yaml new file mode 100644 index 0000000000000..ded85678d2b3d --- /dev/null +++ b/.chloggen/support-query-params.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog) +component: exporter/elasticsearch + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support for extra query parameters to the outgoing bulk request + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [44480] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] From 3863f441f98962d64fa5c6dd73353d805c8c151e Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Mon, 15 Dec 2025 15:40:58 +0530 Subject: [PATCH 8/9] nit --- exporter/elasticsearchexporter/bulkindexer.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exporter/elasticsearchexporter/bulkindexer.go b/exporter/elasticsearchexporter/bulkindexer.go index f6e95d52d766b..3c79aa6d05a7e 100644 --- a/exporter/elasticsearchexporter/bulkindexer.go +++ b/exporter/elasticsearchexporter/bulkindexer.go @@ -115,9 +115,7 @@ func getQueryParamsFromEndpoint(config *Config) (queryParams map[string][]string parsedURL, _ := url.Parse(endpoints[0]) rawQuery := parsedURL.RawQuery - if rawQuery != "" { - queryParams, _ = url.ParseQuery(rawQuery) - } + queryParams, _ = url.ParseQuery(rawQuery) return queryParams } return nil From 78744bf152323be5bcdf1524a92655d08f656596 Mon Sep 17 00:00:00 2001 From: Khushi Jain Date: Tue, 16 Dec 2025 10:02:04 +0530 Subject: [PATCH 9/9] add logger --- exporter/elasticsearchexporter/bulkindexer.go | 18 ++++++++++++------ .../elasticsearchexporter/bulkindexer_test.go | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/exporter/elasticsearchexporter/bulkindexer.go b/exporter/elasticsearchexporter/bulkindexer.go index 0f3e05a4e7616..21f8174e8c11a 100644 --- a/exporter/elasticsearchexporter/bulkindexer.go +++ b/exporter/elasticsearchexporter/bulkindexer.go @@ -81,7 +81,7 @@ func newBulkIndexer( return newSyncBulkIndexer(client, config, requireDataStream, tb, logger) } -func bulkIndexerConfig(client esapi.Transport, config *Config, requireDataStream bool) docappender.BulkIndexerConfig { +func bulkIndexerConfig(client esapi.Transport, config *Config, requireDataStream bool, logger *zap.Logger) docappender.BulkIndexerConfig { var maxDocRetries int if config.Retry.Enabled { maxDocRetries = defaultMaxRetries @@ -102,20 +102,26 @@ func bulkIndexerConfig(client esapi.Transport, config *Config, requireDataStream CompressionLevel: compressionLevel, PopulateFailedDocsInput: config.LogFailedDocsInput, IncludeSourceOnError: bulkIndexerIncludeSourceOnError(config.IncludeSourceOnError), - QueryParams: getQueryParamsFromEndpoint(config), + QueryParams: getQueryParamsFromEndpoint(config, logger), } } -func getQueryParamsFromEndpoint(config *Config) (queryParams map[string][]string) { +func getQueryParamsFromEndpoint(config *Config, logger *zap.Logger) (queryParams map[string][]string) { endpoints, _ := config.endpoints() if len(endpoints) != 0 { // we check the query params set on the first endpoint only // this is enough to replicate to all requests - parsedURL, _ := url.Parse(endpoints[0]) + parsedURL, err := url.Parse(endpoints[0]) + if err != nil { + logger.Warn("Failed to parse URL from endpoint", zap.Error(err)) + } rawQuery := parsedURL.RawQuery - queryParams, _ = url.ParseQuery(rawQuery) + queryParams, err = url.ParseQuery(rawQuery) + if err != nil { + logger.Warn("Failed to parse query parameters from endpoint", zap.Error(err)) + } return queryParams } return nil @@ -146,7 +152,7 @@ func newSyncBulkIndexer( } } return &syncBulkIndexer{ - config: bulkIndexerConfig(client, config, requireDataStream), + config: bulkIndexerConfig(client, config, requireDataStream, logger), maxFlushBytes: maxFlushBytes, flushTimeout: config.Timeout, retryConfig: config.Retry, diff --git a/exporter/elasticsearchexporter/bulkindexer_test.go b/exporter/elasticsearchexporter/bulkindexer_test.go index 50473e92eb950..2dd0e209ecc40 100644 --- a/exporter/elasticsearchexporter/bulkindexer_test.go +++ b/exporter/elasticsearchexporter/bulkindexer_test.go @@ -24,6 +24,7 @@ import ( conventions "go.opentelemetry.io/otel/semconv/v1.37.0" "go.uber.org/zap" "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest" "go.uber.org/zap/zaptest/observer" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter/internal/metadata" @@ -193,7 +194,7 @@ func TestQueryParamsParsedFromEndpoints(t *testing.T) { cfg := createDefaultConfig().(*Config) cfg.Endpoints = []string{"http://localhost:9200?pipeline=test-pipeline"} - bi := bulkIndexerConfig(client, cfg, true) + bi := bulkIndexerConfig(client, cfg, true, zaptest.NewLogger(t)) require.Equal(t, map[string][]string{ "pipeline": {"test-pipeline"}, }, bi.QueryParams)