-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[exporter/elasticsearch] Use confighttp.ClientConfig #33367
[exporter/elasticsearch] Use confighttp.ClientConfig #33367
Conversation
Move Authentication out of ClientConfig, and replace ClientConfig with confighttp.ClientConfig. Implement StartFunc, and create bulk indexer there, so we have access to component.Host for calling confighttp.ClientConfig.ToClient. This enables all standard confighttp functionality, such as auth extensions.
511fead
to
d34e708
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I scanned through the PR and left a comment about compression. I'll review it again when the PR is ready.
Co-authored-by: Carson Ip <carsonip@users.noreply.github.com>
@carsonip thanks - the PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lookin sharp! added some tidies to consider or dismiss, nothing important.
should we add a test for the round-robin? add a bad host like https://not-a-real-host.com:9200 in front of a working one (setting timeouts to a small value so tests don't take too long)?
Co-authored-by: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks!
Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
54d0dcb
into
open-telemetry:main
Description:
Move
Authentication
out ofClientConfig
, and replaceClientConfig
withconfighttp.ClientConfig
. This enables all commonconfighttp
functionality, such as auth extensions, with the exception of "compression".For now compression remains unconfigurable, and is always enabled and uses gzip (this is defined within the go-docappender dependency). We should add some benchmarks (#32504) before switching to the
confighttp
-based compressors.The exporter now implements a
component.StartFunc
, and we create the bulk indexer there so that we have access tocomponent.Host
for callingconfighttp.ClientConfig.ToClient
.Link to tracking Issue:
N/A
Testing:
confighttp
'sauth
is supported, with a mock client authbasicauth
extension, verifying the username/password are passed through to ES as configuredDocumentation:
Updated the exporter's README:
confighttp
'sendpoint
setting is now supported tooconfighttp
,configtls
, andsender_queue
settings, and replaced with links to their docs